Code

Opened 9 months ago

Closed 9 months ago

#20831 closed Bug (invalid)

unicode() is a function, not a type

Reported by: glarrain Owned by: nobody
Component: Documentation Version: master
Severity: Normal Keywords: python3
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

In "Porting to Python 3 / Moved modules".

Submitted pull request https://github.com/django/django/pull/1415

Attachments (0)

Change History (5)

comment:1 Changed 9 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

The docs are correct. Perhaps we should replace the :func:`unicode` markup with ``unicode`` though, as the link may be misleading.

comment:2 Changed 9 months ago by glarrain

timo, I thinks it's either

:func:`unicode` function

or

:class:`unicode` type

but the rest of the sentence goes on about functions (I think), not types. Anyways, it's just a matter of making it consistent.

https://docs.djangoproject.com/en/dev/topics/python3/#string-handling

comment:3 Changed 9 months ago by aaugustin

We'll replace it with str shortly too :)

comment:4 Changed 9 months ago by timo

:class:`unicode` doesn't create a valid link. Later in the sentence :func:basestring() is mentioned, which is an "abstract type" but requires the :func: prefix to link correctly. I'd say we should leave everything as is, or simply remove the links if they cause confusion. When we update the Django interphinx mapping to point to Python 3 rather than 2, I imagine we'll have to remove these links at that time anyway.

comment:5 Changed 9 months ago by timo

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

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.