Opened 2 years ago

Closed 2 years ago

#21036 closed New feature (duplicate)

Note that __unicode__ is __str__ in python 3

Reported by: anonymous Owned by: nobody
Component: Documentation Version: master
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 Changed 2 years ago by aaugustin

  • Easy pickings unset
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.5 to master

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 Changed 2 years ago by claudep

  • Resolution set to duplicate
  • Status changed from new to closed

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