#20691 closed Cleanup/optimization (fixed)
Documentation for "Choosing between __str__() and __unicode__()" is written for Python2 specifically
| Reported by: | Jim Garrison | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | timograham@… | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
At https://docs.djangoproject.com/en/dev/ref/unicode/#choosing-between-str-and-unicode it should be mentioned that __str__() is to be used instead of __unicode__() in Python3. And a note about Python2 compatibility for using __str__() should be provided.
Attachments (2)
Change History (9)
by , 12 years ago
| Attachment: | 20691.diff added |
|---|
comment:1 by , 12 years ago
| Cc: | added |
|---|---|
| Has patch: | set |
| Triage Stage: | Unreviewed → Accepted |
| Type: | Uncategorized → Cleanup/optimization |
| Version: | 1.5 → master |
comment:2 by , 12 years ago
| Patch needs improvement: | set |
|---|
by , 12 years ago
| Attachment: | 20691.2.diff added |
|---|
comment:3 by , 12 years ago
| Patch needs improvement: | unset |
|---|
comment:5 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I think I would have written a note at the start of the subsection:
If you are on Python 3, you can skip this section because you'll always create __str__().... This can prevent a Python 3 user to read the paragraph just to finally realize that he's not concerned.