[Python-Dev] PEP 0008 confusion - here it is, but don't use it?
Skip Montanaro
skip at pobox.com
Fri Aug 6 21:01:14 CEST 2004
>From Raymond's checkin:
Programming Recommendations
- Code should be written in a way that does not disadvantage other
implementations of Python (PyPy, Jython, IronPython, Pyrex, Psyco, and
such). For example, do not rely on CPython's efficient implementation
of in-place string concatenation for statements in the form a+=b or
a=a+b. Those statements run more slowly in Jython. In performance
sensitive parts of the library, the ''.join() form should be used
instead. This will assure that concatenation occurs in linear time
across various implementations.
I'm a bit confused. Why bother to speed up s+=t if we aren't supposed to
use it?
Skip
More information about the Python-Dev
mailing list