[Python-Dev] ctypes: is it intentional that id() is the only way to get the address of an object?
Nathaniel Smith
njs at pobox.com
Fri Jan 18 05:31:00 EST 2019
On Fri, Jan 18, 2019 at 1:51 AM Steven D'Aprano <steve at pearwood.info> wrote:
> Across the entire Python ecosystem, no it isn't, as Jython and
> IronPython return consecutive integers. But should we consider it an
> intentional part of the CPython API?
It's always worked, there's substantial code in the wild that depends
on it, and AFAICT it doesn't cause any real harm, so to me it seems
like the only possible conclusion is that CPython will continue to
guarantee this.
For this argument I don't think it matters whether it was originally
intentional, or whether there's some other alternative that people
could use in theory.
-n
--
Nathaniel J. Smith -- https://vorpus.org
More information about the Python-Dev
mailing list