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/2013-February/124014.html below:

[Python-Dev] Usage of += on strings in loops in stdlib

[Python-Dev] Usage of += on strings in loops in stdlib [Python-Dev] Usage of += on strings in loops in stdlibSerhiy Storchaka storchaka at gmail.com
Wed Feb 13 12:28:32 CET 2013
On 12.02.13 23:03, Maciej Fijalkowski wrote:
> How people feel about generally not having += on long strings in
> stdlib (since the refcount = 1 thing is a hack)?

Sometimes the use of += for strings or bytes is appropriate. For 
example, I deliberately used += for bytes instead b''.join() (note that 
there is even no such hack for bytes) in zipfile module where in most 
cases one of component is empty, and the concatenation of nonempty 
components only happens once. b''.join() was noticeably slower here.

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