R David Murray
749bd42072
Merge #13579 : teach string.Formatter about 'a'.
...
Patch by Francisco Martín Brugué.
2012-08-19 17:45:40 -04:00
R David Murray
e56bf97ef4
#13579 : teach string.Formatter about 'a'.
...
Patch by Francisco Martín Brugué.
2012-08-19 17:26:34 -04:00
Nick Coghlan
62ecb6aa0a
Tidy up the additional string module tests added at the Pycon sprints ( closes #11505 )
2011-05-31 19:40:11 +10:00
Nick Coghlan
7462fa654b
Backport improved test coverage for string.py
2011-03-16 14:30:45 -04:00
Ezio Melotti
42da663e6f
#11515 : fix several typos. Patch by Piotr Kasprzyk.
2011-03-15 05:18:48 +02:00
Ezio Melotti
373089239b
#11515 : Merge with 3.2.
2011-03-15 06:03:08 +02:00
Nick Coghlan
d25fd4d710
Close #11505 : Improve string.py coverage
2011-03-15 08:54:37 +10:00
Ezio Melotti
029625c3f6
Merged revisions 75074 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r75074 | ezio.melotti | 2009-09-26 15:33:22 +0300 (Sat, 26 Sep 2009) | 9 lines
Merged revisions 75070 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75070 | ezio.melotti | 2009-09-26 14:20:53 +0300 (Sat, 26 Sep 2009) | 1 line
#7000 : document "sep" in capwords. Add a few tests
........
................
2009-09-26 12:35:01 +00:00
Ezio Melotti
a40bdda937
Merged revisions 75070 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75070 | ezio.melotti | 2009-09-26 14:20:53 +0300 (Sat, 26 Sep 2009) | 1 line
#7000 : document "sep" in capwords. Add a few tests
........
2009-09-26 12:33:22 +00:00
Ezio Melotti
2dcd4c5a0f
Merged revisions 75072 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r75072 | ezio.melotti | 2009-09-26 15:19:30 +0300 (Sat, 26 Sep 2009) | 1 line
string.capwords is still around, adding back the tests
........
2009-09-26 12:27:13 +00:00
Ezio Melotti
2c6a949e43
string.capwords is still around, adding back the tests
2009-09-26 12:19:30 +00:00
Georg Brandl
abc387747d
Add bytes/bytearray.maketrans() to mirror str.maketrans(), and deprecate
...
string.maketrans() which actually works on bytes. (Also closes #5675.)
2009-04-12 15:51:51 +00:00
Benjamin Peterson
ee8712cda4
#2621 rename test.test_support to test.support
2008-05-20 21:35:26 +00:00
Georg Brandl
7f13e6b3e2
string.maketrans() now produces translation tables for bytes.translate() -- wrong module?
...
Fix all remaining instances that did bad things with the new str.translate().
2007-08-31 10:37:15 +00:00
Eric Smith
3bcc42ad0f
Changed signature of string.Formatter.get_field, per suggestion by
...
Ron Adam.
Added test case for using all parameters in string.Formatter.
2007-08-31 02:26:31 +00:00
Eric Smith
81936699c8
Added test cases for string.Formatter subclassing.
...
Made format_spec parameter to builtin format optional, defaults to
empty string. Added test cases.
2007-08-31 01:14:01 +00:00
Eric Smith
7ade6485ab
PEP 3101: Completed string.Formatter class. Reimplemented field_name to object transformation.
2007-08-26 22:27:13 +00:00
Eric Smith
8c66326368
Implementation of PEP 3101, Advanced String Formatting.
...
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.
2007-08-25 02:26:07 +00:00
Martin v. Löwis
967f1e3b85
Remove string.{letters,lowercase,uppercase}.
2007-08-14 09:23:10 +00:00
Neal Norwitz
9d72bb452b
Remove functions in string module that are also string methods. Also remove:
...
* all calls to functions in the string module (except maketrans)
* everything from stropmodule except for maketrans() which is still used
2007-04-17 08:48:32 +00:00
Guido van Rossum
e2a383d062
Rip out 'long' and 'L'-suffixed integer literals.
...
(Rough first cut.)
2007-01-15 16:59:06 +00:00
Guido van Rossum
b940e113bf
SF patch 1631942 by Collin Winter:
...
(a) "except E, V" -> "except E as V"
(b) V is now limited to a simple name (local variable)
(c) V is now deleted at the end of the except block
2007-01-10 16:19:56 +00:00
Michael W. Hudson
b2308bb9be
Fix bug:
...
[ 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.
2005-10-21 11:45:01 +00:00
Walter Dörwald
57d88e5abd
Move test_bug1001011() to string_tests.MixinStrUnicodeTest so that
...
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)
2004-08-26 16:53:04 +00:00
Raymond Hettinger
674f241e9c
SF Patch #1007087 : Return new string for single subclass joins (Bug #1001011 )
...
(Patch contributed by Nick Coghlan.)
Now joining string subtypes will always return a string.
Formerly, if there were only one item, it was returned unchanged.
2004-08-23 23:23:54 +00:00