Opened 11 years ago

Closed 11 years ago

#21036 closed New feature (duplicate)

Note that __unicode__ is __str__ in python 3

Reported by: anonymous Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords: unicode python3 str
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The documentation at https://docs.djangoproject.com/en/1.5/intro/tutorial01/ does not mention the change in Python 3 where __unicode__ does not exist and __str__ now returns unicode strings. Would be nice to put it in as I didn't know this about python 3 until I looked up why the tutorial code wasn't working.

Change History (2)

comment:1 by Aymeric Augustin, 11 years ago

Easy pickings: unset
Triage Stage: UnreviewedAccepted
Version: 1.5master

IIRC there's a stern warning at the beginning of the tutorial that it's written for Python 2.

I intend to migrate it to Python 3, and reverse the warning, for the 1.7 release but haven't done it yet.

I thought there was a ticket covering that, but I can't find it, so I'll just accept this one.

comment:2 by Claude Paroz, 11 years ago

Resolution: duplicate
Status: newclosed

We fixed it in 1.6 and up in ticket #19211. I didn't backport the patch at that time, but I think we could safely do it.

Note: See TracTickets for help on using tickets.
Back to Top