[issue10021] Format parser is too permissive

Eric Smith report at bugs.python.org
Mon Oct 4 18:54:42 CEST 2010


Eric Smith <eric at trueblade.com> added the comment:

Right. It seemed like a hassle to have the str.format parser try to figure out what a valid identifier is, so it just passes it through.

I don't see this as any different from:

>>> class X:
...    def __getattribute__(self, a): return 'foo'
... 
>>> getattr(X(), '$#@')
'foo'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10021>
_______________________________________


More information about the Python-bugs-list mailing list