summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib/unicode_format.h
Commit message (Collapse)AuthorAgeFilesLines
* bpo-35134: Add Include/cpython/floatobject.h (GH-28957)Victor Stinner2021-10-141-0/+2
| | | | | Split Include/floatobject.h into sub-files: add Include/cpython/floatobject.h and Include/internal/pycore_floatobject.h.
* bpo-42519: Replace PyObject_MALLOC() with PyObject_Malloc() (GH-23587)Victor Stinner2020-12-011-2/+2
| | | | | | | | | No longer use deprecated aliases to functions: * Replace PyObject_MALLOC() with PyObject_Malloc() * Replace PyObject_REALLOC() with PyObject_Realloc() * Replace PyObject_FREE() with PyObject_Free() * Replace PyObject_Del() with PyObject_Free() * Replace PyObject_DEL() with PyObject_Free()
* Fix typos in comments, docs and test names (#15018)Min ho Kim2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Fix typos in comments, docs and test names * Update test_pyparse.py account for change in string length * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: Dealloccte -> Deallocate Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Update posixmodule checksum. * Reverse idlelib changes.
* Improve exception message for str.format (GH-12675)Francisco Couzo2019-06-011-2/+7
|
* bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-311-4/+4
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* bpo-30978: str.format_map() now passes key lookup exceptions through. (#2790)Serhiy Storchaka2017-08-031-6/+10
| | | Previously any exception was replaced with a KeyError exception.
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-4/+2
| | | | possible but Coccinelle couldn't find opportunity.
* Issue #26778: Fixed "a/an/and" typos in code comment, documentation and errorSerhiy Storchaka2016-04-171-1/+1
|\ | | | | | | messages.
| * Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
| |
* | Fixed an incorrect comment.Eric V. Smith2015-08-261-1/+1
|/
* rewrite the parsing of field names to be more consistent wrt recursive expansionBenjamin Peterson2013-05-171-62/+53
|
* merge 3.3Benjamin Peterson2013-05-171-2/+8
|\
| * only recursively expand in the format spec (closes #17644)Benjamin Peterson2013-05-171-2/+8
| |
* | Close #17694: Add minimum length to _PyUnicodeWriterVictor Stinner2013-04-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * Add also min_char attribute to _PyUnicodeWriter structure (currently unused) * _PyUnicodeWriter_Init() has no more argument (except the writer itself): min_length and overallocate must be set explicitly * In error handlers, only enable overallocation if the replacement string is longer than 1 character * CJK decoders don't use overallocation anymore * Set min_length, instead of preallocating memory using _PyUnicodeWriter_Prepare(), in many decoders * _PyUnicode_DecodeUnicodeInternal() checks for integer overflow
* | Add _PyUnicodeWriter_WriteSubstring() functionVictor Stinner2013-04-021-12/+6
|/ | | | | | | | | Write a function to enable more optimizations: * If the substring is the whole string and overallocation is disabled, just keep a reference to the string, don't copy characters * Avoid a call to the expensive _PyUnicode_FindMaxChar() function when possible
* Remove unused defines.Serhiy Storchaka2013-02-231-6/+0
|
* Issue #14993: Use standard "unsigned char" instead of a unsigned char bitfieldVictor Stinner2012-06-041-1/+1
|
* Issue #14744: Use the new _PyUnicodeWriter internal API to speed up str%args ↵Victor Stinner2012-05-291-25/+21
| | | | | | | | | | | | | | | | | and str.format(args) * Formatting string, int, float and complex use the _PyUnicodeWriter API. It avoids a temporary buffer in most cases. * Add _PyUnicodeWriter_WriteStr() to restore the PyAccu optimization: just keep a reference to the string if the output is only composed of one string * Disable overallocation when formatting the last argument of str%args and str.format(args) * Overallocation allocates at least 100 characters: add min_length attribute to the _PyUnicodeWriter structure * Add new private functions: _PyUnicode_FastCopyCharacters(), _PyUnicode_FastFill() and _PyUnicode_FromASCII() The speed up is around 20% in average.
* Rename unicode_write_t structure and its methods to "_PyUnicodeWriter"Victor Stinner2012-05-091-9/+9
|
* Issue #14744: Inline unicode_writer_write_char() and unicode_write_str()Victor Stinner2012-05-091-10/+26
| | | | | Optimize also PyUnicode_Format(): call unicode_writer_prepare() only once per argument.
* Close #14716: str.format() now uses the new "unicode writer" API instead of theVictor Stinner2012-05-071-41/+19
| | | | PyAccu API. For example, it makes str.format() from 25% to 30% faster on Linux.
* Issue #14387: Do not include accu.h from Python.h.Antoine Pitrou2012-03-221-0/+1
|
* Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)Victor Stinner2011-12-011-1/+1
| | | | Create an empty string with the new Unicode API.
* Replace PyUnicodeObject type by PyObjectVictor Stinner2011-11-031-12/+8
| | | | | * _PyUnicode_CheckConsistency() now takes a PyObject* instead of void* * Remove now useless casts to PyObject*
* Fix massive slowdown in string formatting with str.format.Antoine Pitrou2011-10-071-128/+24
| | | | | | | | | | Example: ./python -m timeit -s "f='{}' + '-' * 1024 + '{}'; s='abcd' * 16384" "f.format(s, s)" -> before: 547 usec per loop -> after: 13 usec per loop -> 3.2: 22.5 usec per loop -> 2.7: 12.6 usec per loop
* Fix compilation warnings under 64-bit WindowsAntoine Pitrou2011-10-061-1/+1
|
* Implement PEP 393.Martin v. Löwis2011-09-281-0/+1416