Re: [Python-Dev] __qualname__ format question
On 25.06.17 14:41, Serhiy Storchaka wrote: > 25.06.17 15:06, Christian Tismer пише: >> by chance, I stumbled over >> >> meth_get__qualname__ >> >> in methodobject.c and >> >> calculate_qualname >> >> in descrobject.c . >> >> The first uses >> >> res = PyUnicode_FromFormat("%S.%s", type_qualname, >> m->m_ml->ml_name); >> >> and the latter uses >> >> res = PyUnicode_FromFormat("%S.%S", type_qualname, descr->d_name); >> >> To my knowledge, the "%S" character is undefined in C99 and C11. >> >> Q: Why this character, and why this difference? > > Se the documentation of PyUnicode_FromFormat(). > > https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_FromFormat > > ___ > Python-Dev mailing list > Python-Dev@python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/tismer%40stackless.com Ah, thank you very much. Cheers - Chris -- Christian Tismer :^) tis...@stackless.com Software Consulting : http://www.stackless.com/ Karl-Liebknecht-Str. 121 : https://github.com/PySide 14482 Potsdam: GPG key -> 0xFB7BEE0E phone +49 173 24 18 776 fax +49 (30) 700143-0023 signature.asc Description: OpenPGP digital signature ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] __qualname__ format question
25.06.17 15:06, Christian Tismer пише: by chance, I stumbled over meth_get__qualname__ in methodobject.c and calculate_qualname in descrobject.c . The first uses res = PyUnicode_FromFormat("%S.%s", type_qualname, m->m_ml->ml_name); and the latter uses res = PyUnicode_FromFormat("%S.%S", type_qualname, descr->d_name); To my knowledge, the "%S" character is undefined in C99 and C11. Q: Why this character, and why this difference? Se the documentation of PyUnicode_FromFormat(). https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_FromFormat ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] __qualname__ format question
Hi friends, by chance, I stumbled over meth_get__qualname__ in methodobject.c and calculate_qualname in descrobject.c . The first uses res = PyUnicode_FromFormat("%S.%s", type_qualname, m->m_ml->ml_name); and the latter uses res = PyUnicode_FromFormat("%S.%S", type_qualname, descr->d_name); To my knowledge, the "%S" character is undefined in C99 and C11. Q: Why this character, and why this difference? cheers - Chris -- Christian Tismer :^) tis...@stackless.com Software Consulting : http://www.stackless.com/ Karl-Liebknecht-Str. 121 : https://github.com/PySide 14482 Potsdam: GPG key -> 0xFB7BEE0E phone +49 173 24 18 776 fax +49 (30) 700143-0023 signature.asc Description: OpenPGP digital signature ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com