A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-October/113881.html below:

[Python-Dev] [Python-checkins] cpython: When expandtabs() would be a no-op, don't create a duplicate string

[Python-Dev] [Python-checkins] cpython: When expandtabs() would be a no-op, don't create a duplicate string [Python-Dev] [Python-checkins] cpython: When expandtabs() would be a no-op, don't create a duplicate stringÉric Araujo merwok at netwok.org
Thu Oct 6 15:42:34 CEST 2011
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/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?
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4