summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib
Commit message (Collapse)AuthorAgeFilesLines
* #9418: first step of moving private string methods to _string module.Georg Brandl2010-10-141-2/+2
|
* Fix #8530: Prevent stringlib fastsearch from reading beyond the front of an ↵Florent Xicluna2010-08-081-2/+2
| | | | array.
* Issue #9337: Make float.__str__ identical to float.__repr__.Mark Dickinson2010-08-041-6/+11
| | | | (And similarly for complex numbers.)
* Issue #9416: Fix some issues with complex formatting where theMark Dickinson2010-08-011-4/+8
| | | | | | | 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 unneeded error checkBenjamin Peterson2010-07-111-8/+0
|
* Merged revisions 81824 via svnmerge fromBenjamin Peterson2010-06-071-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81824 | benjamin.peterson | 2010-06-07 17:32:44 -0500 (Mon, 07 Jun 2010) | 1 line remove extra byte and fix comment ........
* Merged revisions 81820 via svnmerge fromBenjamin Peterson2010-06-071-0/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81820 | benjamin.peterson | 2010-06-07 17:23:23 -0500 (Mon, 07 Jun 2010) | 1 line correctly overflow when indexes are too large ........
* Merged revisions 81813 via svnmerge fromBenjamin Peterson2010-06-071-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81813 | benjamin.peterson | 2010-06-07 16:37:09 -0500 (Mon, 07 Jun 2010) | 2 lines locale grouping strings should end in '\0' ........
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-092-98/+98
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 78349 via svnmerge fromEric Smith2010-02-231-4/+7
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78349 | eric.smith | 2010-02-22 19:11:16 -0500 (Mon, 22 Feb 2010) | 1 line Issue #6902: Fix problem with built-in types format incorrectly with 0 padding. ........
* Merged revisions 78329 via svnmerge fromEric Smith2010-02-221-10/+40
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78329 | eric.smith | 2010-02-22 13:33:47 -0500 (Mon, 22 Feb 2010) | 1 line Issue #7988: Fix default alignment to be right aligned for complex.__format__. Now it matches other numeric types. ........
* Merged revisions ↵Benjamin Peterson2010-02-031-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 77484,77487,77561,77570,77593,77603,77608,77667,77702-77703,77739,77858,77887,77889 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r77484 | skip.montanaro | 2010-01-13 19:12:34 -0600 (Wed, 13 Jan 2010) | 4 lines Update PyEval_EvalFrame to PyEval_EvalFrameEx. This looks to have been done partially before. Also add a comment describing how this might have to work with different versions of the interpreter. ........ r77487 | ezio.melotti | 2010-01-14 05:34:10 -0600 (Thu, 14 Jan 2010) | 1 line Fixed typo ........ r77561 | georg.brandl | 2010-01-17 02:42:30 -0600 (Sun, 17 Jan 2010) | 1 line #7699: improve datetime docs: straightforward linking to strftime/strptime section, mark classmethods as such. ........ r77570 | georg.brandl | 2010-01-17 06:14:42 -0600 (Sun, 17 Jan 2010) | 1 line Add note about usage of STRINGLIB_EMPTY. ........ r77593 | georg.brandl | 2010-01-17 17:33:53 -0600 (Sun, 17 Jan 2010) | 1 line Fix internal reference. ........ r77603 | benjamin.peterson | 2010-01-18 17:07:56 -0600 (Mon, 18 Jan 2010) | 8 lines data descriptors do not override the class dictionary if __get__ is not defined Adjust documentation and add a test to verify this behavior. See http://mail.python.org/pipermail/python-dev/2010-January/095637.html for discussion. ........ r77608 | gregory.p.smith | 2010-01-19 02:19:03 -0600 (Tue, 19 Jan 2010) | 6 lines Do not compile stubs for the sha2 series hashes in the openssl hashlib module when the openssl version is too old to support them. That leads both compiled code bloat and to unittests attempting to test implementations that don't exist for comparison purposes on such platforms. ........ r77667 | mark.dickinson | 2010-01-21 12:32:27 -0600 (Thu, 21 Jan 2010) | 1 line Add two more test_strtod test values. ........ r77702 | georg.brandl | 2010-01-23 02:43:31 -0600 (Sat, 23 Jan 2010) | 1 line #7762: fix refcount annotation of PyUnicode_Tailmatch(). ........ r77703 | georg.brandl | 2010-01-23 02:47:54 -0600 (Sat, 23 Jan 2010) | 1 line #7725: fix referencing issue. ........ r77739 | benjamin.peterson | 2010-01-24 21:52:52 -0600 (Sun, 24 Jan 2010) | 1 line mention from_float() in error message ........ r77858 | georg.brandl | 2010-01-30 11:57:48 -0600 (Sat, 30 Jan 2010) | 1 line #7802: fix invalid example (heh). ........ r77887 | georg.brandl | 2010-01-31 12:51:49 -0600 (Sun, 31 Jan 2010) | 5 lines Fix-up ftplib documentation: move exception descriptions to toplevel, not inside a class remove attribution in "versionadded" spell and grammar check docstring of FTP_TLS ........ r77889 | michael.foord | 2010-01-31 13:59:26 -0600 (Sun, 31 Jan 2010) | 1 line Minor modification to unittest documentation. ........
* Merged revisions 77469-77470 via svnmerge fromAntoine Pitrou2010-01-131-11/+23
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77469 | antoine.pitrou | 2010-01-13 14:43:37 +0100 (mer., 13 janv. 2010) | 3 lines Test commit to try to diagnose failures of the IA-64 buildbot ........ r77470 | antoine.pitrou | 2010-01-13 15:01:26 +0100 (mer., 13 janv. 2010) | 3 lines Sanitize bloom filter macros ........
* svnmerge duplicated contents of Objects/stringlib/split.hAntoine Pitrou2010-01-131-394/+0
|
* Merged revisions 77461 via svnmerge fromAntoine Pitrou2010-01-139-195/+884
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77461 | antoine.pitrou | 2010-01-13 08:55:48 +0100 (mer., 13 janv. 2010) | 5 lines Issue #7622: Improve the split(), rsplit(), splitlines() and replace() methods of bytes, bytearray and unicode objects by using a common implementation based on stringlib's fast search. Patch by Florent Xicluna. ........
* Merged revisions 77241 via svnmerge fromAntoine Pitrou2010-01-026-86/+94
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77241 | antoine.pitrou | 2010-01-02 22:12:58 +0100 (sam., 02 janv. 2010) | 4 lines Issue #7462: Implement the stringlib fast search algorithm for the `rfind`, `rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna. ........
* Issue #5748: bytesobject.c should not have its own private defines for ↵Eric Smith2009-11-302-0/+2
| | | | stringlib macros. Also removed unused defines and include for localutil.h.
* Keep this file in sync with trunk.Eric Smith2009-11-291-20/+0
|
* Merged revisions 74269 via svnmerge fromEric Smith2009-07-301-3/+20
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r74269 | eric.smith | 2009-07-30 09:39:44 -0400 (Thu, 30 Jul 2009) | 1 line Issue 6330: Fix --enable-unicode=ucs4. ........
* Sync trunk and py3k versions of string formatting. Manual merge of r74219.Eric Smith2009-07-271-9/+16
|
* Merged revisions 72848 via svnmerge fromEric Smith2009-05-231-2/+3
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72848 | eric.smith | 2009-05-23 09:56:13 -0400 (Sat, 23 May 2009) | 1 line Issue 6089: str.format raises SystemError. ........
* Issue #3382. float 'F' formatting no longer maps to 'f'. This only affects ↵Eric Smith2009-05-061-10/+9
| | | | nan and inf.
* 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.
* Merged revisions 72189 via svnmerge fromEric Smith2009-05-021-0/+6
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72189 | eric.smith | 2009-05-02 05:58:09 -0400 (Sat, 02 May 2009) | 1 line Keep py3k and trunk code in sync. ........
* Issue #5859: Remove '%f' to '%g' formatting switch for large floats.Mark Dickinson2009-05-011-2/+0
|
* Merged revisions 72159 via svnmerge fromGeorg Brandl2009-05-011-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72159 | georg.brandl | 2009-05-01 10:51:37 +0200 (Fr, 01 Mai 2009) | 2 lines #5889: remove comma at the end of a list that some C compilers don't like. ........
* Issue #1588: Add complex.__format__.Eric Smith2009-04-301-49/+334
|
* Merged revisions 72040 via svnmerge fromEric Smith2009-04-271-2/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72040 | eric.smith | 2009-04-27 15:04:37 -0400 (Mon, 27 Apr 2009) | 1 line Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to py3k. Should fix Windows buildbot errors. ........
* Merged revisions 71802 via svnmerge fromEric Smith2009-04-221-0/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71802 | eric.smith | 2009-04-22 12:20:47 -0400 (Wed, 22 Apr 2009) | 1 line Fixed issue 5782: formatting with commas didn't work if no specifier type code was given. ........
* The other half of Issue #1580: use short float repr where possible.Eric Smith2009-04-162-414/+573
| | | | | | | | | | | | | | Addresses the float -> string conversion, using David Gay's code which was added in Mark Dickinson's checkin r71663. Also addresses these, which are intertwined with the short repr changes: - Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100' - Issue #5515: 'n' formatting with commas no longer works poorly with leading zeros. - PEP 378 Format Specifier for Thousands Separator: implemented for floats.
* Merged revisions 71548 via svnmerge fromEric Smith2009-04-131-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r71548 | eric.smith | 2009-04-12 20:29:50 -0400 (Sun, 12 Apr 2009) | 1 line Fixed incorrect object passed into format_float_internal(). This was resulting in a conversion being done twice. ........
* Resolves issue 5690: accidentally skipping code in non-debug build.Eric Smith2009-04-041-2/+2
|
* Added ',' thousands grouping to int.__format__. See PEP 378.Eric Smith2009-04-034-85/+151
| | | | | | | | | This is incomplete, but I want to get some version into the next alpha. I am still working on: Documentation. More tests. Implement for floats. In addition, there's an existing bug with 'n' formatting that carries forward to thousands grouping (issue 5515).
* Removed mixed tabs and whitespace.Eric Smith2009-04-031-96/+96
|
* Merged revisions 70678 via svnmerge fromMark Dickinson2009-03-291-1/+1
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70678 | mark.dickinson | 2009-03-29 15:37:51 +0100 (Sun, 29 Mar 2009) | 3 lines Issue #532631: Replace confusing fabs(x)/1e25 >= 1e25 test with fabs(x) >= 1e50, and fix documentation. ........
* Merged revisions 70364 via svnmerge fromEric Smith2009-03-141-44/+129
| | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70364 | eric.smith | 2009-03-14 07:57:26 -0400 (Sat, 14 Mar 2009) | 17 lines Issue 5237, Allow auto-numbered replacement fields in str.format() strings. 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. ........
* Merged revisions 69806 via svnmerge fromEric Smith2009-02-201-17/+31
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69806 | eric.smith | 2009-02-20 09:02:36 -0500 (Fri, 20 Feb 2009) | 1 line Issue #5247: Improve error message when unknown format codes are used when using str.format() with str, int, and float arguments. ........
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-2/+2
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.
* Merged revisions 68750,68776-68777,68811,68842,68859 via svnmerge fromBenjamin Peterson2009-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68750 | benjamin.peterson | 2009-01-18 16:47:04 -0600 (Sun, 18 Jan 2009) | 1 line fix encoding cookie case ........ r68776 | benjamin.peterson | 2009-01-19 10:17:54 -0600 (Mon, 19 Jan 2009) | 1 line move BufferedIOBase into the base class section ........ r68777 | benjamin.peterson | 2009-01-19 10:18:27 -0600 (Mon, 19 Jan 2009) | 1 line add email address ........ r68811 | benjamin.peterson | 2009-01-20 12:58:27 -0600 (Tue, 20 Jan 2009) | 1 line fix url ........ r68842 | andrew.kuchling | 2009-01-20 20:16:26 -0600 (Tue, 20 Jan 2009) | 1 line Markup fixes ........ r68859 | georg.brandl | 2009-01-22 12:29:28 -0600 (Thu, 22 Jan 2009) | 2 lines Clarify wording. ........
* 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. (*) or at least it is our interpretation
* Merged revisions 66631 via svnmerge fromAmaury Forgeot d'Arc2008-09-262-8/+6
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r66631 | amaury.forgeotdarc | 2008-09-27 00:34:08 +0200 (sam., 27 sept. 2008) | 7 lines #3967: Correct a crash in count() and find() methods of string-like objects. For example: "".count("xxxx", sys.maxint, 0) Reviewed by Benjamin Peterson. Will port to 2.5 and 3.0. ........
* Removed merge glitch from stringlib/find.h as explained on the python ↵Christian Heimes2008-08-281-1/+1
| | | | | | committers list. The FROM_BYTEARRAY isn't required here. This also fixes bug #3713
* Merged revisions ↵Benjamin Peterson2008-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 65910,65977,65980,65984,65986,66000,66011-66012,66014,66017,66020 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r65910 | benjamin.peterson | 2008-08-20 09:07:59 -0500 (Wed, 20 Aug 2008) | 1 line fix up the multiprocessing docs a little ........ r65977 | christian.heimes | 2008-08-22 14:47:25 -0500 (Fri, 22 Aug 2008) | 3 lines Silenced compiler warning Objects/stringlib/find.h:97: warning: 'stringlib_contains_obj' defined but not used Reviewed by Benjamin Peterson ........ r65980 | christian.heimes | 2008-08-22 15:10:27 -0500 (Fri, 22 Aug 2008) | 3 lines Fixed two format strings in the _collections module. For example Modules/_collectionsmodule.c:674: warning: format '%i' expects type 'int', but argument 2 has type 'Py_ssize_t' Reviewed by Benjamin Peterson ........ r65984 | christian.heimes | 2008-08-22 16:23:47 -0500 (Fri, 22 Aug 2008) | 1 line d is the correct format string ........ r65986 | mark.hammond | 2008-08-22 19:59:14 -0500 (Fri, 22 Aug 2008) | 2 lines Fix bug 3625: test issues on 64bit windows. r=pitrou ........ r66000 | benjamin.peterson | 2008-08-23 15:27:43 -0500 (Sat, 23 Aug 2008) | 5 lines #3643 add a few more checks to _testcapi to prevent segfaults Author: Victor Stinner Reviewer: Benjamin Peterson ........ r66011 | neal.norwitz | 2008-08-24 12:27:43 -0500 (Sun, 24 Aug 2008) | 1 line Ignore a couple more tests that report leaks inconsistently. ........ r66012 | neal.norwitz | 2008-08-24 12:29:53 -0500 (Sun, 24 Aug 2008) | 1 line Use the actual blacklist of leaky tests ........ r66014 | georg.brandl | 2008-08-24 13:11:07 -0500 (Sun, 24 Aug 2008) | 2 lines #3654: fix duplicate test method name. Review by Benjamin P. ........ r66017 | benjamin.peterson | 2008-08-24 16:55:03 -0500 (Sun, 24 Aug 2008) | 1 line remove note about unimplemented feature ........ r66020 | brett.cannon | 2008-08-24 18:15:19 -0500 (Sun, 24 Aug 2008) | 1 line Clarify that some attributes/methods are listed somewhat separately because they are not part of the threading API. ........
* Merged revisions 66006 via svnmerge fromNeal Norwitz2008-08-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk TESTED=./python -E -tt ./Lib/test/regrtest.py -uall (both debug and opt modes) ........ r66006 | neal.norwitz | 2008-08-23 22:04:52 -0700 (Sat, 23 Aug 2008) | 25 lines Fix: * 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. ........
* Backed out r65073, pending fixing it in Windows.Eric Smith2008-07-171-6/+6
|
* Merged revisions 65069 via svnmerge fromEric Smith2008-07-171-6/+6
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65069 | eric.smith | 2008-07-17 13:48:39 -0400 (Thu, 17 Jul 2008) | 1 line Issue 3382: Make '%F' and float.__format__('F') convert results to upper case. ........
* Merged revisions 65023 via svnmerge fromEric Smith2008-07-161-32/+32
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65023 | eric.smith | 2008-07-16 14:29:51 -0400 (Wed, 16 Jul 2008) | 1 line Renamed a parameter in calc_number_widths, for consistency with the same parameter in fill_non_digits. ........
* Merged revisions 64984 via svnmerge fromEric Smith2008-07-161-30/+68
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r64984 | eric.smith | 2008-07-15 20:11:49 -0400 (Tue, 15 Jul 2008) | 1 line Complete issue 3083: add alternate (#) formatting to bin, oct, hex in str.format(). ........
* Forward port of r64958.Eric Smith2008-07-151-13/+43
| | | | Added '#' formatting to integers. This adds the 0b, 0o, or 0x prefix for bin, oct, hex. There's still one failing case, and I need to finish the docs. I hope to finish those today.
* Merged revisions 64499 via svnmerge fromEric Smith2008-06-241-13/+13
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r64499 | eric.smith | 2008-06-24 07:11:59 -0400 (Tue, 24 Jun 2008) | 1 line Fixed formatting with thousands separator and padding. Resolves issue 3140. ........