Mercurial > cpython-lru_cache-weakref
annotate Python/formatter_unicode.c @ 65221:faa4e22aaba7 2.7
Blocked revisions 85322,85326 via svnmerge
........
r85322 | r.david.murray | 2010-10-08 11:55:28 -0400 (Fri, 08 Oct 2010) | 8 lines
#4661: add bytes parsing and generation to email (email version bump to 5.1.0)
The work on this is not 100% complete, but everything is present to
allow real-world testing of the code. The only remaining major todo
item is to (hopefully!) enhance the handling of non-ASCII bytes in headers
converted to unicode by RFC2047 encoding them rather than replacing them with
'?'s.
........
r85326 | r.david.murray | 2010-10-08 17:37:39 -0400 (Fri, 08 Oct 2010) | 2 lines
What's new entry for email 5.1.
........
| author | R. David Murray <rdmurray@bitdance.com> |
|---|---|
| date | Tue, 12 Oct 2010 14:16:46 +0000 |
| parents | 34e7c1b14495 |
| children |
| rev | line source |
|---|---|
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
1 /* Implements the unicode (as opposed to string) version of the |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
2 built-in formatter for unicode. That is, unicode.__format__(). */ |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
3 |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
4 #include "Python.h" |
|
51032
551257c8058a
fix building the core with --disable-unicode
Benjamin Peterson <benjamin@python.org>
parents:
47392
diff
changeset
|
5 |
|
551257c8058a
fix building the core with --disable-unicode
Benjamin Peterson <benjamin@python.org>
parents:
47392
diff
changeset
|
6 #ifdef Py_USING_UNICODE |
|
551257c8058a
fix building the core with --disable-unicode
Benjamin Peterson <benjamin@python.org>
parents:
47392
diff
changeset
|
7 |
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
8 #include "../Objects/stringlib/unicodedefs.h" |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
9 |
|
47392
47ef9a806ce9
Refactor and clean up str.format() code (and helpers) in advance of optimizations.
Eric Smith <eric@trueblade.com>
parents:
45381
diff
changeset
|
10 #define FORMAT_STRING _PyUnicode_FormatAdvanced |
|
47ef9a806ce9
Refactor and clean up str.format() code (and helpers) in advance of optimizations.
Eric Smith <eric@trueblade.com>
parents:
45381
diff
changeset
|
11 |
|
53629
34e7c1b14495
Issue #1588: Add complex.__format__.
Eric Smith <eric@trueblade.com>
parents:
51032
diff
changeset
|
12 /* don't define FORMAT_LONG, FORMAT_FLOAT, and FORMAT_COMPLEX, since |
|
34e7c1b14495
Issue #1588: Add complex.__format__.
Eric Smith <eric@trueblade.com>
parents:
51032
diff
changeset
|
13 we can live with only the string versions of those. The builtin |
|
34e7c1b14495
Issue #1588: Add complex.__format__.
Eric Smith <eric@trueblade.com>
parents:
51032
diff
changeset
|
14 format() will convert them to unicode. */ |
|
47392
47ef9a806ce9
Refactor and clean up str.format() code (and helpers) in advance of optimizations.
Eric Smith <eric@trueblade.com>
parents:
45381
diff
changeset
|
15 |
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
16 #include "../Objects/stringlib/formatter.h" |
|
51032
551257c8058a
fix building the core with --disable-unicode
Benjamin Peterson <benjamin@python.org>
parents:
47392
diff
changeset
|
17 |
|
551257c8058a
fix building the core with --disable-unicode
Benjamin Peterson <benjamin@python.org>
parents:
47392
diff
changeset
|
18 #endif |
