summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib/formatter.h
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases ↵Christian Heimes2007-12-021-1/+1
| | | | in intobject.h
* Changed to use 'U' argument to PyArg_ParseTuple, instead of manually ↵Eric Smith2007-09-011-15/+3
| | | | checking for unicode objects.
* Added format tests.Eric Smith2007-08-301-14/+14
| | | | | Fixed bug in alignment of negative numbers. Whitespace normalization.
* Patch # 1048 by Amaury Forgeot d'Arc.Guido van Rossum2007-08-291-1/+1
| | | | | | test_float crashes on Windows, because the %zd format is used in a call to PyOS_snprintf(). The attached patch properly uses PY_FORMAT_SIZE_T.
* Corrected missed #if in r57652.Eric Smith2007-08-291-0/+2
|
* Added conditional compilation for '()', which was an allowed sign code in aEric Smith2007-08-291-1/+8
| | | | | | | previous version of PEP 3101. It's currently not compiled in, but I want to leave it because it might be useful in the future and it makes calc_number_widths() clearer. It justifies NumberFieldWidths.rsign and .n__rsign.
* Code layout changes for PEP 7 compliance.Eric Smith2007-08-281-9/+18
|
* Implementation of PEP 3101, Advanced String Formatting.Eric Smith2007-08-251-0/+966
Known issues: The string.Formatter class, as discussed in the PEP, is incomplete. Error handling needs to conform to the PEP. Need to fix this warning that I introduced in Python/formatter_unicode.c: Objects/stringlib/unicodedefs.h:26: warning: `STRINGLIB_CMP' defined but not used Need to make sure sign formatting is correct, more tests needed. Need to remove '()' sign formatting, left over from an earlier version of the PEP.