On 14/02/13 01:44, Nick Coghlan wrote:
Deliberately *relying* on the += hack to avoid quadratic runtime is
just plain wrong, and our documentation already says so.
+1
I'm not sure that there's any evidence that people in general are *relying* on
the += hack. More likely they write the first
On 14/02/13 02:22, Marius Gedminas wrote:
On Wed, Feb 13, 2013 at 11:10:26PM +1100, Steven D'Aprano wrote:
Best practice remains the same:
- we should still use join for repeated concatenations;
- we should still avoid + except for small cases which are not performance
critical;
- we should
Hi Lennart,
Sent from my Ei4Steve
On Feb 13, 2013, at 8:42, Lennart Regebro wrote:
>> Something is needed - a patch for PyPy or for the documentation I guess.
>
> Not arguing that it wouldn't be good, but I disagree that it is needed.
>
> This is only an issue when you, as in your proof, have
Hi,
This was already discussed on pypy-dev a few times, like in 2011
(http://mail.python.org/pipermail//pypy-dev/2011-August/008068.html).
Google finds more (site:mail.python.org pypy-dev string
concatenation).
A bientôt,
Armin.
___
pypy-dev mailing l
On Wed, Feb 13, 2013 at 11:10:26PM +1100, Steven D'Aprano wrote:
> Best practice remains the same:
>
> - we should still use join for repeated concatenations;
>
> - we should still avoid + except for small cases which are not performance
> critical;
>
> - we should still teach beginners to use
On Wed, Feb 13, 2013 at 10:06 PM, Christian Tismer wrote:
> To avoid such hidden traps in larger code bases, documentation is
> needed that clearly gives a warning saying "don't do that", like CS
> students learn for most other languages.
How much more explicit do you want us to be?
"""6. CPytho
On 13/02/13 10:53, Christian Tismer wrote:
Hi friends,
_efficient string concatenation_ has been a topic in 2004.
Armin Rigo proposed a patch with the name of the subject,
more precisely:
/[Patches] [ python-Patches-980695 ] efficient string concatenation//
//on sourceforge.net, on 2004-06-28./
On 13.02.13 08:42, Lennart Regebro wrote:
Something is needed - a patch for PyPy or for the documentation I guess.
Not arguing that it wouldn't be good, but I disagree that it is needed.
This is only an issue when you, as in your proof, have a loop that
does concatenation. This is usually when
> Something is needed - a patch for PyPy or for the documentation I guess.
Not arguing that it wouldn't be good, but I disagree that it is needed.
This is only an issue when you, as in your proof, have a loop that
does concatenation. This is usually when looping over a list of
strings that should