Changes between Initial Version and Version 2 of Ticket #20639


Ignore:
Timestamp:
Jun 21, 2013, 11:25:02 AM (11 years ago)
Author:
Luke Plant
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20639

    • Property Resolutioninvalid
    • Property Status newclosed
  • Ticket #20639 – Description

    initial v2  
    11https://docs.djangoproject.com/en/1.5/intro/tutorial01/
    2 On the above mentioned page, the tutorial tells me to write a __unicode__() method to get a human-readable represantation of my object. I tried but it didn't work. I then found out that since I'm using Python 3.3 I have to define a method __ string __(). Since there's a block debating whether to use __str__() or __unicode__() anyways, may it would be useful to add a hint for Python 3.x users to always use __str__().
     2On the above mentioned page, the tutorial tells me to write a `__unicode__()` method to get a human-readable representation of my object. I tried but it didn't work. I then found out that since I'm using Python 3.3 I have to define a method `__ str __()`. Since there's a block debating whether to use `__str__()` or `__unicode__()` anyways, may it would be useful to add a hint for Python 3.x users to always use `__str__()`.
    33
    44Regards,
    55Fabian
    6 
    7 P.S.: Unfortunately the methodnames beginning with two underscores are interpreted as wiki syntax.
Back to Top