Peter Funk wrote: > > > >>> "12345 John Doe" / "%5d %8s" > (12345, 'John Doe') > >>> "12 34 56 7.890" / "%d %d %d %f" > (12, 34, 56, 7.8899999999999997) > >>> "12345 John Doe, Foo Bar" / "%(num)d %(n)s, %(f)s %(b)s" > {'n': 'John Doe', 'f': 'Foo', 'b': 'Bar', 'num': 12345} > >>> "1 2" / "%d %d %d" > Traceback (innermost last): > File "<stdin>", line 1, in ? > TypeError: not all arguments filled I would prefer "foo".scanf("%5d %8s") or maybe "parse" or "parseformats" or something like that. I know that punctuation abuse leads inexorably to further punctuation abuse but the cycle must stop somewhere. It's too late for "%" but let's save "/" while we still can! -- Take a recipe. Leave a recipe. Python Cookbook! http://www.ActiveState.com/pythoncookbook
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