[issue12579] str.format_map raises a SystemError for non-mapping

Julian report at bugs.python.org
Mon Jul 18 00:11:49 CEST 2011


Julian <Julian+Python.org at GrayVines.com> added the comment:

Yeah, I saw the line you suggested and didn't think that was it.

To expand on this, perhaps "{foo}".format(12) should raise a TypeError as well? I'd expect that more than the current behavior which is a KeyError. That KeyError is getting raised in get_field_object, which is where the fix needs to be, or at least needs to be changed, I'm just trying not to duplicate code.

----------

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


More information about the Python-bugs-list mailing list