Opened 11 years ago

Closed 11 years ago

#20831 closed Bug (invalid)

unicode() is a function, not a type

Reported by: German Larrain Owned by: nobody
Component: Documentation Version: dev
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

Change History (5)

comment:1 by Tim Graham, 11 years ago

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

comment:2 by German Larrain, 11 years ago

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 by Aymeric Augustin, 11 years ago

We'll replace it with str shortly too :)

comment:4 by Tim Graham, 11 years ago

: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 by Tim Graham, 11 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top