]> granicus.if.org Git - python/commit
Backport of PEP 3101, Advanced String Formatting, from py3k.
authorEric Smith <eric@trueblade.com>
Sun, 17 Feb 2008 19:46:49 +0000 (19:46 +0000)
committerEric Smith <eric@trueblade.com>
Sun, 17 Feb 2008 19:46:49 +0000 (19:46 +0000)
commita9f7d6248032c9572b4d2024a1be8bd2823af09f
tree5465a1051312055678248db0076d314924ee4ebc
parente139688d34cc12b23d3a310f10d4f440f75f7d08
Backport of PEP 3101, Advanced String Formatting, from py3k.

Highlights:
 - Adding PyObject_Format.
 - Adding string.Format class.
 - Adding __format__ for str, unicode, int, long, float, datetime.
 - Adding builtin format.
 - Adding ''.format and u''.format.
 - str/unicode fixups for formatters.

The files in Objects/stringlib that implement PEP 3101 (stringdefs.h,
unicodedefs.h, formatter.h, string_format.h) are identical in trunk
and py3k.  Any changes from here on should be made to trunk, and
changes will propogate to py3k).
27 files changed:
Include/abstract.h
Include/formatter_string.h [new file with mode: 0644]
Include/formatter_unicode.h [new file with mode: 0644]
Lib/string.py
Lib/test/test_builtin.py
Lib/test/test_datetime.py
Lib/test/test_descrtut.py
Lib/test/test_str.py
Lib/test/test_string.py
Lib/test/test_types.py
Lib/test/test_unicode.py
Makefile.pre.in
Modules/datetimemodule.c
Objects/abstract.c
Objects/floatobject.c
Objects/intobject.c
Objects/longobject.c
Objects/stringlib/formatter.h [new file with mode: 0644]
Objects/stringlib/string_format.h [new file with mode: 0644]
Objects/stringlib/stringdefs.h [new file with mode: 0644]
Objects/stringlib/unicodedefs.h [new file with mode: 0644]
Objects/stringobject.c
Objects/typeobject.c
Objects/unicodeobject.c
Python/bltinmodule.c
Python/formatter_string.c [new file with mode: 0644]
Python/formatter_unicode.c [new file with mode: 0644]