summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib
Commit message (Collapse)AuthorAgeFilesLines
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-071-1/+1
|
* Corrections for a/an in code comments and documentationMartin Panter2016-05-081-2/+2
|
* Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
|
* Issue #7267: format(int, 'c') now raises OverflowError when the argument is notVictor Stinner2015-11-091-0/+8
| | | | in range(0, 256).
* Issue #12546: Allow \x00 as a fill character for builtin type __format__ ↵Eric V. Smith2014-04-141-10/+8
| | | | methods.
* fix expandtabs overflow detection to be consistent and not rely on signed ↵Benjamin Peterson2014-03-301-19/+19
| | | | overflow
* Issue #18137: Detect integer overflow on precision in float.__format__()Victor Stinner2013-06-231-2/+14
| | | | and complex.__format__().
* Issue #14700: Fix buggy overflow checks for large precision and width in ↵Mark Dickinson2012-10-282-18/+13
| | | | new-style and old-style formatting.
* startswith and endswith don't accept None as slice index. Patch by Torsten ↵Jesus Cea2011-04-201-19/+48
| | | | Becker. (closes #11828)
* #11515: fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-151-1/+1
|
* Merged revisions 83833,83838-83839,83859,83878 via svnmerge fromFlorent Xicluna2010-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83833 | florent.xicluna | 2010-08-08 18:25:27 +0200 (dim., 08 août 2010) | 2 lines Add test case for the HTTPResponse being an iterable. Follow-up of issue #4608. ........ r83838 | florent.xicluna | 2010-08-08 20:03:44 +0200 (dim., 08 août 2010) | 2 lines Typo. ........ r83839 | florent.xicluna | 2010-08-08 20:06:13 +0200 (dim., 08 août 2010) | 2 lines Issue #7564: Skip test_ioctl if another process is attached to /dev/tty. ........ r83859 | florent.xicluna | 2010-08-09 00:07:16 +0200 (lun., 09 août 2010) | 2 lines Fix #8530: Prevent stringlib fastsearch from reading beyond the front of an array. ........ r83878 | florent.xicluna | 2010-08-09 10:29:08 +0200 (lun., 09 août 2010) | 1 line Merge the 2to3 script from /sandbox/trunk/2to3/2to3, revision 72867 (latest). ........
* Merged revisions 83400 via svnmerge fromMark Dickinson2010-08-011-4/+8
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83400 | mark.dickinson | 2010-08-01 11:41:49 +0100 (Sun, 01 Aug 2010) | 7 lines Issue #9416: Fix some issues with complex formatting where the output with no type specifier failed to match the str output: - format(complex(-0.0, 2.0), '-') omitted the real part from the output, - format(complex(0.0, 2.0), '-') included a sign and parentheses. ........
* remove extra byte and fix commentBenjamin Peterson2010-06-071-2/+2
|
* correctly overflow when indexes are too largeBenjamin Peterson2010-06-071-0/+4
|
* locale grouping strings should end in '\0'Benjamin Peterson2010-06-071-1/+1
|
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-89/+89
|
* Issue #6902: Fix problem with built-in types format incorrectly with 0 padding.Eric Smith2010-02-231-4/+7
|
* Issue #7988: Fix default alignment to be right aligned for ↵Eric Smith2010-02-221-10/+40
| | | | complex.__format__. Now it matches other numeric types.
* Add note about usage of STRINGLIB_EMPTY.Georg Brandl2010-01-171-4/+5
|
* Sanitize bloom filter macrosAntoine Pitrou2010-01-131-11/+23
|
* Test commit to try to diagnose failures of the IA-64 buildbotAntoine Pitrou2010-01-131-2/+2
|
* Issue #7622: Improve the split(), rsplit(), splitlines() and replace()Antoine Pitrou2010-01-1310-196/+504
| | | | | methods of bytes, bytearray and unicode objects by using a common implementation based on stringlib's fast search. Patch by Florent Xicluna.
* Issue #7462: Implement the stringlib fast search algorithm for the `rfind`,Antoine Pitrou2010-01-026-86/+94
| | | | `rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna.
* Issue #3382: Make '%F' and float.__format__('F') convert results to upper ↵Eric Smith2009-11-291-14/+0
| | | | case. Much of the patch came from Mark Dickinson.
* Issue #7117, continued: Remove substitution of %g-style formatting forMark Dickinson2009-11-231-6/+0
| | | | | %f-style formatting, which used to occur at high precision. Float formatting should now be consistent between 2.7 and 3.1.
* Issue 6330: Fix --enable-unicode=ucs4.Eric Smith2009-07-301-3/+20
|
* Sync trunk and py3k versions of string formatting. Will manually merge into ↵Eric Smith2009-07-271-0/+6
| | | | py3k.
* Issue 6089: str.format raises SystemError.Eric Smith2009-05-231-2/+3
|
* Issue #5920: Changed format.__float__ and complex.__float__ to use a ↵Eric Smith2009-05-051-4/+8
| | | | precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson.
* Keep py3k and trunk code in sync.Eric Smith2009-05-021-0/+4
|
* #5889: remove comma at the end of a list that some C compilers don't like.Georg Brandl2009-05-011-1/+1
|
* Issue #1588: Add complex.__format__.Eric Smith2009-04-301-49/+334
|
* Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to ↵Eric Smith2009-04-271-11/+2
| | | | py3k. Should fix Windows buildbot errors.
* Fixed issue 5782: formatting with commas didn't work if no specifier type ↵Eric Smith2009-04-221-0/+1
| | | | code was given.
* Backport of some of the work in r71665 to trunk. This reworks much ofEric Smith2009-04-223-443/+676
| | | | | | | | | | | | | | | | | | | | | int, long, and float __format__(), and it keeps their implementation in sync with py3k. Also added PyOS_double_to_string. This is the "fallback" version that's also available in trunk, and should be kept in sync with that code. I'll add an issue to document PyOS_double_to_string in the C API. There are many internal cleanups. Externally visible changes include: - Implement PEP 378, Format Specifier for Thousands Separator, for floats, ints, and longs. - Issue #5515: 'n' formatting for ints, longs, and floats handles leading zero formatting poorly. - Issue #5772: For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent.
* Fixed incorrect object passed into format_float_internal(). This was ↵Eric Smith2009-04-131-1/+1
| | | | resulting in a conversion being done twice.
* Issue #532631: Replace confusing fabs(x)/1e25 >= 1e25 testMark Dickinson2009-03-291-1/+1
| | | | with fabs(x) >= 1e50, and fix documentation.
* Issue 5237, Allow auto-numbered replacement fields in str.format() strings.Eric Smith2009-03-141-44/+129
| | | | | | | | | | | | | | | | | For simple uses for str.format(), this makes the typing easier. Hopfully this will help in the adoption of str.format(). For example: 'The {} is {}'.format('sky', 'blue') You can mix and matcth auto-numbering and named replacement fields: 'The {} is {color}'.format('sky', color='blue') But you can't mix and match auto-numbering and specified numbering: 'The {0} is {}'.format('sky', 'blue') ValueError: cannot switch from manual field specification to automatic field numbering Will port to 3.1.
* Issue #5247: Improve error message when unknown format codes are used when ↵Eric Smith2009-02-201-17/+31
| | | | using str.format() with str, unicode, long, int, and float arguments.
* fix urlBenjamin Peterson2009-01-201-1/+1
|
* Issue #4935: The overflow checking code in the expandtabs() method commonAntoine Pitrou2009-01-131-37/+30
| | | | | to str, bytes and bytearray could be optimized away by the compiler, letting the interpreter segfault instead of raising an error.
* #3967: Correct a crash in count() and find() methods of string-like objects.Amaury Forgeot d'Arc2008-09-262-8/+6
| | | | | | | | For example: "".count("xxxx", sys.maxint, 0) Reviewed by Benjamin Peterson. Will port to 2.5 and 3.0.
* Fix:Neal Norwitz2008-08-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * crashes on memory allocation failure found with failmalloc * memory leaks found with valgrind * compiler warnings in opt mode which would lead to invalid memory reads * problem using wrong name in decimal module reported by pychecker Update the valgrind suppressions file with new leaks that are small/one-time leaks we don't care about (ie, they are too hard to fix). TBR=barry TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes) in opt mode: valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py -uall,-bsddb,-compiler \ -x test_logging test_ssl test_multiprocessing valgrind -q --leak-check=yes --suppressions=Misc/valgrind-python.supp \ ./python -E -tt ./Lib/test/regrtest.py test_multiprocessing for i in `seq 1 4000` ; do LD_PRELOAD=~/local/lib/libfailmalloc.so FAILMALLOC_INTERVAL=$i \ ./python -c pass done At least some of these fixes should probably be backported to 2.5.
* Silenced compiler warningChristian Heimes2008-08-221-1/+1
| | | | | Objects/stringlib/find.h:97: warning: 'stringlib_contains_obj' defined but not used Reviewed by Benjamin Peterson
* Backport of r63826.Eric Smith2008-08-181-6/+42
| | | | | | | | | | | | Optimization of str.format() for cases with str, unicode, int, long, and float arguments. This gives about 30% speed improvement for the simplest (but most common) cases. This patch skips the __format__ dispatch, and also avoids creating an object to hold the format_spec. Unfortunately there's a complication in 2.6 with int, long, and float because they always expect str format_specs. So in the unicode version of this optimization, just check for unicode objects. int, float, long, and str can be added later, if needed.
* Backed out r65069, pending fixing it in Windows.Eric Smith2008-07-171-6/+6
|
* Issue 3382: Make '%F' and float.__format__('F') convert results to upper case.Eric Smith2008-07-171-6/+6
|
* Renamed a parameter in calc_number_widths, for consistency with the same ↵Eric Smith2008-07-161-32/+32
| | | | parameter in fill_non_digits.
* Complete issue 3083: add alternate (#) formatting to bin, oct, hex in ↵Eric Smith2008-07-161-30/+68
| | | | str.format().
* Added '#' formatting to integers. This adds the 0b, 0o, or 0x prefix for ↵Eric Smith2008-07-151-13/+43
| | | | bin, oct, hex. There's still one failing case, and I need to finish the docs. I hope to finish those today.