[issue2598] "{ +(}".format(**{' +(': 44}) should produce ValueError: invalid identifier, ' +(' in format

Alexander Belopolsky report at bugs.python.org
Wed Apr 9 23:23:36 CEST 2008


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

This is a feature explained in PEP 3101:

"""
    Implementation note: The implementation of this proposal is
    not required to enforce the rule about a simple or dotted name
    being a valid Python identifier.  Instead, it will rely on the
    getattr function of the underlying object to throw an exception if
    the identifier is not legal.  The str.format() function will have
    a minimalist parser which only attempts to figure out when it is
    "done" with an identifier (by finding a '.' or a ']', or '}',
    etc.).
""" <http://www.python.org/dev/peps/pep-3101>


Why is that a problem for you?

----------
nosy: +belopolsky

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2598>
__________________________________


More information about the Python-bugs-list mailing list