This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author memeplex
Recipients amaury.forgeotdarc, belopolsky, eryksun, martin.panter, meador.inge, memeplex
Date 2016-06-11.20:10:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465675802.57.0.361309375005.issue26565@psf.upfronthosting.co.za>
In-reply-to
Content
Martin, there were two reasons:

1. Conciseness: addressof(p.contents) vs. p.value.
2. Uniformity: I expect the value of a pointer to be the address it points to.

Then Eryk pointed out that p.value has already another meaning for simple pointer types, so (2) can't be fully achieved and for (1) it will be necessary to pick another attribute name. But we could still get something shorter and uniform inside the subset of pointer types.

p.as_void makes me expect a c_void_p instance. In that case the address will be p.as_void.value (or p.as_void().value?), which is a bit indirect. I think p.toaddress conveys the exact meaning[1] and consistently follows the naming style of addressof, besides being slightly shorter.


[1] Well, toaddress might mean "get the pointed-to address" or "convert from pointer to address", but in any case the meaning is right.
History
Date User Action Args
2016-06-11 20:10:02memeplexsetrecipients: + memeplex, amaury.forgeotdarc, belopolsky, meador.inge, martin.panter, eryksun
2016-06-11 20:10:02memeplexsetmessageid: <1465675802.57.0.361309375005.issue26565@psf.upfronthosting.co.za>
2016-06-11 20:10:02memeplexlinkissue26565 messages
2016-06-11 20:10:02memeplexcreate