[Python-Dev] [Python-checkins] cpython: When expandtabs() would be a no-op, don't create a duplicate string (original) (raw)
Éric Araujo merwok at netwok.org
Thu Oct 6 15:42:34 CEST 2011
- Previous message: [Python-Dev] check for PyUnicode_READY look backwards
- Next message: [Python-Dev] Rename PyUnicode_KIND_SIZE ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
http://hg.python.org/cpython/rev/447f521ac6d9 user: Antoine Pitrou <solipsis at pitrou.net> date: Tue Oct 04 16:04:01 2011 +0200 summary: When expandtabs() would be a no-op, don't create a duplicate string
diff --git a/Lib/test/testunicode.py b/Lib/test/testunicode.py --- a/Lib/test/testunicode.py +++ b/Lib/test/testunicode.py @@ -1585,6 +1585,10 @@ return self.assertRaises(OverflowError, 't\tt\t'.expandtabs, sys.maxsize) + def testexpandtabsoptimization(self): + s = 'abc' + self.assertIs(s.expandtabs(), s)
Shouldn’t that be marked CPython-specific?
- Previous message: [Python-Dev] check for PyUnicode_READY look backwards
- Next message: [Python-Dev] Rename PyUnicode_KIND_SIZE ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]