Reinhold Birkenfeld wrote: > Raymond Hettinger wrote: > > Actually, formatting needs to become a function. The overloading of the > > arithmetic mod operator has proven to be unfortunate (if only because of > > precedence issues). > > But then, a format() function would be necessary (equivalent to sprintf) Does it have to be a function? I'd expect it to be a method, like string.Template. E.g >>> '%s: %i'.substitute('badger', 42) badger: 42 >>> '%(name)s: %(count)i'.substitute(name='badger', count=42) badger: 42 BTW, I'm quite happy with the current string formatting format. I certainly haven't "taken issue with the trailing s in %(myvar)s". If it wasn't there, when it is for %(count)i and %(ratio)f, I'd probably wonder why. STeVe -- You can wordify anything if you just verb it. --- Bucky Katt, Get Fuzzy
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