[issue15801] Weird string interpolation behaviour

Mike Graham report at bugs.python.org
Tue Aug 28 23:27:59 CEST 2012


Mike Graham added the comment:

Line 13464 of unicodeobject.c is

    if (Py_TYPE(args)->tp_as_mapping && !PyTuple_Check(args) &&
        !PyUnicode_Check(args))

Too lazy to check, but don't user-created types have a tp_as_mapping? If so, I think it mistakes Foo() for a dict.

----------
nosy: +Mike.Graham

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


More information about the Python-bugs-list mailing list