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/2004-August/048225.html below:

[Python-Dev] Re: Update PEP 292

[Python-Dev] Re: Update PEP 292 [Python-Dev] Re: Update PEP 292Raymond Hettinger python at rcn.com
Mon Aug 23 02:47:14 CEST 2004
> ... the implementation (patch) I'm going to post
> will require throw the ValueError for all bad placeholders.

Since you're overriding the mod operator, it may be best to emulate its
behavior which is to throw a KeyError:



>>> '%(bingo)s' % {'bongo':'xxx'}

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in -toplevel-
    '%(bingo)s' % {'bongo':'xxx'}
KeyError: 'bingo'



Raymond

More information about the Python-Dev mailing list

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