[Python-3000] PEP: Drop Implicit String Concatentation (original) (raw)

Raymond Hettinger python at rcn.com
Tue May 1 08:56:32 CEST 2007


PEP: Remove Implicit String Concatenation

Motivation

One goal for Python 3000 should be to simplify the language by removing unnecessary features. Implicit string concatenation should be dropped in favor of existing techniques. This will simplify the grammar and simplify a user's mental picture of Python. The latter is important for letting the language "fit in your head". A large group of current users do not even know about implicit concatenation. Of those who do know about it, a large portion never use it or habitually avoid it. Of those both know about it and use it, very few could state with confidence the implicit operator precedence and under what circumstances it is computed when the definition is compiled versus when it is run.

Uses and Substitutes

Automatic Substitution

When transitioning to Py3.0, some care should be taken to not blindly drop-in a plus operator and possibly incur a change in semantics due to operator precendence. A pair such as: "abc" "def" should be replaced using parentheses: ("abc" + "def")



More information about the Python-3000 mailing list