Code

Opened 7 months ago

Closed 7 months 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.

Attachments (0)

Change History (2)

comment:1 Changed 7 months 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 7 months 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.