Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> Binary operations on collections are, in general, of quadratic complexity.

BTW, this seems like drastic mischaracterization, making it seem like something 
is wrong with the containers.  It is more accurate to say that an uncommon user 
pattern of repeated copy-and-add operations on containers can give quadratic 
behavior.

Likewise, it is a mischaracterization to say this PR "fixes" the containers.  
Instead, it uses what is arguably a hack to recognize potential cases where the 
copy step can be skipped, even though that is what the user explicitly 
specified should occur.

Armin, do you remember the outcome of the discussions when you added the string 
optimization for repeated concatenation.  I do remember that we told users not 
to rely on it and that the str.join() was still the recommended best practice.

----------
nosy: +arigo

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36229>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to