Issue3641
Created on 2008-08-22 00:19 by tav, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg71708 - (view) | Author: tav (tav) | Date: 2008-08-22 00:19 | |
Perhaps I misunderstood the intended behaviour of the ascii() builtin in the future_builtins module, but the following behaviour is unexpected: >>> from __future__ import unicode_literals >>> from future_builtins import ascii >>> test = 'hello' >>> ascii(test) "u'hello'" Surely the leading 'u' should not be there? After all, this is a future builtin we are importing -- when all 'strings' are unicode by default? |
|||
| msg71710 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2008-08-22 00:36 | |
This is a side effect of ascii returning a python 2.x unicode object. The repr still gives a leading "u". The point of ascii is that it returns a unicode object with only ascii characters. See PEP 3138 for more information. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:38 | admin | set | github: 47891 |
| 2008-08-22 00:36:43 | benjamin.peterson | set | status: open -> closed resolution: wont fix messages: + msg71710 nosy: + benjamin.peterson |
| 2008-08-22 00:19:55 | tav | create | |
