That is on pourpose and is the public API for Python. In Python it returns an iterable of tuples, which is processed from the actual internal form.
On Wed, 9 Feb 2022 at 18:56, Victor Stinner <vstin...@python.org> wrote: > On Wed, Feb 9, 2022 at 5:48 PM Pablo Galindo Salgado > <pablog...@gmail.com> wrote: > > We consider the representation of co_postions private, so we don't want > (for now) to ad > > getters/setters. If you want to get the position of a instruction, you > can use PyCode_Addr2Location > > The code.co_positions() method is accessible in Python: it's not > documented, but its name doesn't say that it's private. Was it done on > purpose? Should it renamed to _co_positions() or even be removed? > > Victor > -- > Night gathers, and now my watch begins. It shall not end until my death. >
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/MPQ2XT5HYTLCJ3DEH4EH7QP7BEZ57OCN/ Code of Conduct: http://python.org/psf/codeofconduct/