A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-April/014030.html below:

[Python-Dev] s1 == (sf % (s1

[Python-Dev] s1 == (sf % (s1 / sf))? A bad idea?Paul Prescod paulp@ActiveState.com
Mon, 02 Apr 2001 18:06:49 -0700
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