Hi, > http://hg.python.org/cpython/rev/447f521ac6d9 > user: Antoine Pitrou <solip...@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/test_unicode.py b/Lib/test/test_unicode.py > --- a/Lib/test/test_unicode.py > +++ b/Lib/test/test_unicode.py > @@ -1585,6 +1585,10 @@ > return > self.assertRaises(OverflowError, 't\tt\t'.expandtabs, sys.maxsize) > > + def test_expandtabs_optimization(self): > + s = 'abc' > + self.assertIs(s.expandtabs(), s)
Shouldn’t that be marked CPython-specific? _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com