Changes between Initial Version and Version 2 of Ticket #20639
- Timestamp:
- Jun 21, 2013, 11:25:02 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #20639
- Property Resolution → invalid
- Property Status new → closed
-
Ticket #20639 – Description
initial v2 1 1 https://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__().2 On 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__()`. 3 3 4 4 Regards, 5 5 Fabian 6 7 P.S.: Unfortunately the methodnames beginning with two underscores are interpreted as wiki syntax.