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 <[email protected]> wrote: > On Wed, Feb 9, 2022 at 5:48 PM Pablo Galindo Salgado > <[email protected]> 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 -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/MPQ2XT5HYTLCJ3DEH4EH7QP7BEZ57OCN/ Code of Conduct: http://python.org/psf/codeofconduct/
