A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-March/117376.html below:

[Python-Dev] PEP-393/PEP-3118: unicode format specifiers

[Python-Dev] PEP-393/PEP-3118: unicode format specifiers [Python-Dev] PEP-393/PEP-3118: unicode format specifiersStefan Krah stefan at bytereef.org
Tue Mar 6 17:04:47 CET 2012
Hello,

In the array module the 'u' specifier previously meant "2-bytes, on wide
builds 4-bytes". Currently in 3.3 the 'u' specifier is mapped to UCS4.

I think it would be nice for Python3.3 to implement the PEP-3118
suggestion:

'c' -> UCS1

'u' -> UCS2

'w' -> UCS4


Actually we could even add 'a' -> ASCII, then a unicode object could
be a buffer provider that gives the correct view according to the
maxchar in the buffer. This opens the possibility for strongly typed
memoryviews of strings. Not sure if this is useful, just an idea.


Stefan Krah


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4