#25462 closed Cleanup/optimization (fixed)
Move __unicode__ documentation and its notice after __str__
Reported by: | Simon Charette | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | 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
In the other model instance methods doc we start by documenting by a notice about __unicode__
vs __str__
followed by the actual __unicode__
and __str__
documentation.
Because of the way blocks are arranged it's not clear the notice is about __unicode__
vs __str__
or and not other model instance methods in general.
Since the tutorial is oriented toward Python 3 I would suggest we reorder the doc blocks as follow:
__str__
;__str__
vs__unicode__
notice;__unicode__
.
It should make it clear the notice is about interaction of both methods and express our preference toward Python 3.
Change History (7)
comment:1 by , 9 years ago
follow-up: 3 comment:2 by , 9 years ago
Triage Stage: | Unreviewed → Accepted |
---|
I think I would remove the heading/and method annotation for __unicode__
and leave it mentioned in a note box under __str__
with a title like "Using Python 2?".
comment:3 by , 9 years ago
Replying to timgraham:
I think I would remove the heading/and method annotation for
__unicode__
and leave it mentioned in a note box under__str__
with a title like "Using Python 2?".
Makes sense to me.
Actually this whole section would benefit of a small rewrite with Python 3 in mind.