Skip Montanaro wrote: > >... > > So? There are some things Perl does better than Python, some things Python > does better than Perl. It doesn't have anything to do with competing with Perl. It is just about learning from things that other languages do better (in this case simpler) than Python. This feature came from the Bourne shell and is also present in DOS batch, TCL, Ruby, PHP. Python's "%" is much better than nothing (which is what Javascript has) but it is still a pain. First you use it with positional arguments and then realize that is getting confusing so you switch to dictionary arguments and then that gets unweildy because you're just declaring new names for existing variables so you use vars(). But then you want to interpolate the result of a function call or expression. So you have to set up a one-time-use variable. PEP 215 (which I did not write!) unifies all of the use cases into one syntax that can be taught in ten minutes. The % syntax is fine for totally different use cases: printf-style formatting and interpolation of strings that might be generated at runtime. Paul Prescod
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