> `...` is already in python though. But not in this form. > Better to generalise and/or extend an already existing construct than to > add a new one, I would assert. Only if that construct is successful. `...` has a bad rep -- people by and large prefer repr(). > Youre also right about `...` being less visible than other pairs of > delimiters. > > I think, though, that if modifying the % notation, that the requirement > should be for delimiters that are not parentheses, and ones that > wouldn't interfere with putting expressions between them. This would > allow for eval()ing the content between the delimiters. You could do that with ${...} if it skipped nested {...} inside, which I plan to implement as an (initially secret) extension. That should be good enough. If you try to put string literals containing { or } inside ${...} you deserve what you get. :-) Still, this wouldn't work: x = 12 y = 14 print "$x times $y equals ${x*y}".sub() You'd have to pass a special magic dict (which I *won't* supply). --Guido van Rossum (home page: http://www.python.org/~guido/)
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