Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix endcase for str.rpartition() | Raymond Hettinger | 2006-09-04 | 1 | -1/+1 |
| | |||||
* | Bug #1515471: string.replace() accepts character buffers again. | Neal Norwitz | 2006-07-30 | 1 | -2/+7 |
| | | | | Pass the char* and size around rather than PyObject's. | ||||
* | Apply perky's fix for #1503157: "/".join([u"", u""]) raising OverflowError. | Georg Brandl | 2006-06-10 | 1 | -0/+2 |
| | | | | Also improve error message on overflow. | ||||
* | RFE #1491485: str/unicode.endswith()/startswith() now accept a tuple as ↵ | Georg Brandl | 2006-06-09 | 1 | -1/+31 |
| | | | | first argument. | ||||
* | Re-enable a new empty-string test added during the NFS sprint, | Tim Peters | 2006-06-01 | 1 | -6/+1 |
| | | | | | | but disabled then because str and unicode strings gave different results. The implementations were repaired later during the sprint, but the new test remained disabled. | ||||
* | changed count to return 0 for slices outside the source string | Fredrik Lundh | 2006-05-30 | 1 | -1/+2 |
| | |||||
* | changed find/rfind to return -1 for matches outside the source string | Fredrik Lundh | 2006-05-30 | 1 | -0/+8 |
| | |||||
* | fixed "abc".count("", 100) == -96 error (hopefully, nobody's relying on | Fredrik Lundh | 2006-05-29 | 1 | -0/+8 |
| | | | | the current behaviour ;-) | ||||
* | needspeed: rpartition documentation, tests, and a bug fixes. | Fredrik Lundh | 2006-05-26 | 1 | -2/+17 |
| | | | | feel free to add more tests and improve the documentation. | ||||
* | Test for more edge strip cases; leading and trailing separator gets removed | Andrew Dalke | 2006-05-26 | 1 | -0/+2 |
| | | | | even with strip(..., 0) | ||||
* | Added more rstrip tests, including for prealloc'ed arrays | Andrew Dalke | 2006-05-26 | 1 | -1/+54 |
| | |||||
* | Test cases for off-by-one errors in string split with multicharacter pattern. | Andrew Dalke | 2006-05-26 | 1 | -0/+2 |
| | |||||
* | I like tests. | Andrew Dalke | 2006-05-26 | 1 | -0/+32 |
| | | | | | | | The new split functions use a preallocated list. Added tests which exceed the preallocation size, to exercise list appends/resizes. Also added more edge case tests. | ||||
* | Added split whitespace checks for characters other than space. | Andrew Dalke | 2006-05-26 | 1 | -0/+1 |
| | |||||
* | Added a few more test cases for whitespace split. These strings have ↵ | Andrew Dalke | 2006-05-26 | 1 | -0/+7 |
| | | | | leading whitespace. | ||||
* | needforspeed: partition implementation, part two. | Fredrik Lundh | 2006-05-26 | 1 | -0/+15 |
| | | | | feel free to improve the documentation and the docstrings. | ||||
* | Whitespace normalization. | Tim Peters | 2006-05-25 | 1 | -2/+2 |
| | |||||
* | needforspeed: check for overflow in replace (from Andrew Dalke) | Fredrik Lundh | 2006-05-25 | 1 | -9/+8 |
| | |||||
* | Added tests for implementation error we came up with in the need for speed ↵ | Andrew Dalke | 2006-05-25 | 1 | -0/+19 |
| | | | | sprint. | ||||
* | Disable the damn empty-string replace test -- it can't | Tim Peters | 2006-05-24 | 1 | -2/+2 |
| | | | | | be make to pass now for unicode if it passes for str, or vice versa. | ||||
* | We can't leave the checked-in tests broken. | Tim Peters | 2006-05-24 | 1 | -5/+10 |
| | |||||
* | Added a slew of test for string replace, based various corner cases from | Andrew Dalke | 2006-05-24 | 1 | -0/+157 |
| | | | | | | | | | | the Need For Speed sprint coding. Includes commented out overflow tests which will be uncommented once the code is fixed. This test will break the 8-bit string tests because "".replace("", "A") == "" when it should == "A" We have a fix for it, which should be added tomorrow. | ||||
* | Merge ssize_t branch. | Martin v. Löwis | 2006-02-15 | 1 | -1/+3 |
| | |||||
* | Fix bug: | Michael W. Hudson | 2005-10-21 | 1 | -0/+9 |
| | | | | | | | | [ 1327110 ] wrong TypeError traceback in generator expressions by removing the code that can stomp on the users' TypeError raised by the iterable argument to ''.join() -- PySequence_Fast (now?) gives a perfectly reasonable message itself. Also, a couple of tests. | ||||
* | Disable encoding/decoding test, if unicode is disabled. | Walter Dörwald | 2005-07-28 | 1 | -19/+20 |
| | |||||
* | * Beef-up tests for str.count(). | Raymond Hettinger | 2005-02-20 | 1 | -0/+28 |
| | | | | * Speed-up str.count() by using memchr() to fly between first char matches. | ||||
* | * Beef-up testing of str.__contains__() and str.find(). | Raymond Hettinger | 2005-02-20 | 1 | -0/+24 |
| | | | | | | | | | | | | | | | | | | | * Speed-up "x in y" where x has more than one character. The existing code made excessive calls to the expensive memcmp() function. The new code uses memchr() to rapidly find a start point for memcmp(). In addition to knowing that the first character is a match, the new code also checks that the last character is a match. This significantly reduces the incidence of false starts (saving memcmp() calls and making quadratic behavior less likely). Improves the timings on: python -m timeit -r7 -s"x='a'*1000" "'ab' in x" python -m timeit -r7 -s"x='a'*1000" "'bc' in x" Once this code has proven itself, then string_find_internal() should refer to it rather than running its own version. Also, something similar may apply to unicode objects. | ||||
* | SF bug #1054139: serious string hashing error in 2.4b1 | Raymond Hettinger | 2004-10-26 | 1 | -0/+9 |
| | | | | | _PyString_Resize() readied strings for mutation but did not invalidate the cached hash value. | ||||
* | test_bug1001011(): Verify that | Tim Peters | 2004-08-27 | 1 | -5/+33 |
| | | | | | | | | | s.join([t]) is t for (s, t) in (str, str), (unicode, unicode), and (str, unicode). For (unicode, str), verify that it's *not* t (the result is promoted to unicode instead). Also verify that when t is a subclass of str or unicode that "the right thing" happens. | ||||
* | Move test_bug1001011() to string_tests.MixinStrUnicodeTest so that | Walter Dörwald | 2004-08-26 | 1 | -0/+19 |
| | | | | | | it can be used for str and unicode. Drop the test for "".join([s]) is s because this is an implementation detail (and doesn't work for unicode) | ||||
* | SF #989185: Drop unicode.iswide() and unicode.width() and add | Hye-Shik Chang | 2004-08-04 | 1 | -25/+0 |
| | | | | | | | | | | | | unicodedata.east_asian_width(). You can still implement your own simple width() function using it like this: def width(u): w = 0 for c in unicodedata.normalize('NFC', u): cwidth = unicodedata.east_asian_width(c) if cwidth in ('W', 'F'): w += 2 else: w += 1 return w | ||||
* | Add iswide() and width() method for UserString according as the | Hye-Shik Chang | 2004-06-04 | 1 | -0/+25 |
| | | | | addition to unicode objects. | ||||
* | [SF #866875] Add a specialized routine for one character | Hye-Shik Chang | 2004-01-05 | 1 | -14/+55 |
| | | | | separaters on str.split() and str.rsplit(). | ||||
* | Fix unicode.rsplit()'s bug that ignores separater on the end of string when | Hye-Shik Chang | 2003-12-23 | 1 | -0/+2 |
| | | | | using specialized splitter for 1 char sep. | ||||
* | Add rsplit method for str and unicode builtin types. | Hye-Shik Chang | 2003-12-15 | 1 | -0/+20 |
| | | | | | SF feature request #801847. Original patch is written by Sean Reifschneider. | ||||
* | Add optional fillchar argument to ljust(), rjust(), and center() string methods. | Raymond Hettinger | 2003-11-26 | 1 | -3/+3 |
| | |||||
* | SF bug #795506: Wrong handling of string format code for float values. | Raymond Hettinger | 2003-08-27 | 1 | -0/+1 |
| | | | | | | Adding missing support for '%F'. Will backport to 2.3.1. | ||||
* | Whitespace normalization. | Tim Peters | 2003-04-24 | 1 | -1/+0 |
| | |||||
* | Attempt to make all the various string *strip methods the same. | Neal Norwitz | 2003-04-10 | 1 | -28/+27 |
| | | | | | | | | | | | * Doc - add doc for when functions were added * UserString * string object methods * string module functions 'chars' is used for the last parameter everywhere. These changes will be backported, since part of the changes have already been made, but they were inconsistent. | ||||
* | Fix PyString_Format() so that '%c' % u'a' returns u'a' | Walter Dörwald | 2003-03-31 | 1 | -0/+1 |
| | | | | | | | | instead of raising a TypeError. (From SF patch #710127) Add tests to verify this is fixed. Add various tests for '%c' % int. | ||||
* | Add two tests for simple error cases. | Walter Dörwald | 2003-03-26 | 1 | -0/+4 |
| | |||||
* | Get test to work on alpha | Neal Norwitz | 2003-02-23 | 1 | -1/+1 |
| | |||||
* | Port all string tests to PyUnit and share as much tests | Walter Dörwald | 2003-02-21 | 1 | -317/+616 |
| | | | | | | | between str, unicode, UserString and the string module as possible. This increases code coverage in stringobject.c from 83% to 86% and should help keep the string classes in sync in the future. From SF patch #662807 | ||||
* | Patch #650653: Raise always value error if the table is not 256 bytes long. | Martin v. Löwis | 2002-12-12 | 1 | -0/+2 |
| | |||||
* | check for str.__mod__ | Neil Schemenauer | 2002-11-18 | 1 | -0/+3 |
| | |||||
* | Code by Inyeol Lee, submitted to SF bug 595350, to implement | Guido van Rossum | 2002-08-23 | 1 | -0/+4 |
| | | | | | the string/unicode method .replace() with a zero-lengt first argument. Inyeol contributed tests for this too. | ||||
* | Moved inplace add and multiply methods from UserString to MutableString. | Raymond Hettinger | 2002-08-09 | 1 | -0/+6 |
| | | | | | Closes SF Bug #592573 where inplace add mutated a UserString. Added unittests to verify the bug is cleared. | ||||
* | Revised the test suite for 'contains' to use the test() function argument | Raymond Hettinger | 2002-08-09 | 1 | -9/+9 |
| | | | | | rather than vereq(). While it was effectively testing regular strings, it ignored the test() function argument when called by test_userstring.py. | ||||
* | Whitespace normalization. | Tim Peters | 2002-08-08 | 1 | -1/+0 |
| | |||||
* | Committing patch #591250 which provides "str1 in str2" when str1 is a | Barry Warsaw | 2002-08-06 | 1 | -1/+21 |
| | | | | string of longer than 1 character. |