[Guido van Rossum] > The $ means "substitution" in so many languages besides Perl that I > wonder where you've been. Of course, I've been elsewhere. But Python currently uses `%' for driving interpolation, and on this topic, I've been with Python, if you wonder :-). > I quite like the positional % substitution. I think %(...)s was a > mistake -- what we really wanted was ${...}. The distinction between %()s and %()r, recently introduced, has been useful. But with str() and repr(), only one of those is really necessary. But it gave the impression that Python trend is pushing for % to get stronger. The proposal of using $ as yet another formatting avenue makes it weaker. > Less clutter. Compare > "My name is $name, I live in $country" > to > "My name is ${name}, I live in ${country}" > The {} add nothing but noise. We're copying this from the shell. Noise decreases legibility. So, maybe the PEP should not say that ${name} is to be preferred over $name? Or else, it should explain why. -- François Pinard http://www.iro.umontreal.ca/~pinard
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