Hmm, thanks, although I don't see why it was rejected, since it seems to me that by using the addition operator or triple-quoting all the use cases would become clearer and not significantly harder to write, while the (often silent) errors would not happen any more. The PEP only mentions that "the feature to be removed isn't all that harmful, and there are some use cases that would become harder", but I'm not sure that the "harder use cases" (which ones?) justify the error potential. Stavros Korokithakis Michael Foord wrote: > Stavros Korokithakis wrote: >> Hello, >> is concatenation of adjacent strings a useful feature? So far the only >> use case I've seen is causing me endless hours of debugging when I >> forget the comma in a tuple of strings, like so: >> >> ("first", >> "second" >> "third") >> >> Which then becomes a tuple of two items, instead of three. It would >> have been much better if it produced an error. Is there any good >> reason that this feature exists, or would it be better if it were >> removed? > > It can be a very useful feature. > > See the rejected PEP 3126 for a discussion: > > http://www.python.org/dev/peps/pep-3126/ > > Michael Foord > >> >> Regards, >> Stavros Korokithakis >> _______________________________________________ >> Python-Dev mailing list >> Python-Dev at python.org >> http://mail.python.org/mailman/listinfo/python-dev >> Unsubscribe: >> http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk >> > >
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