[Tutor] introspection

Alex Kleider akleider at sonic.net
Tue Apr 21 05:46:54 CEST 2015


On 2015-04-20 13:24, Ben Finney wrote:
> Alex Kleider <akleider at sonic.net> writes:
> 
>> Does python provide the introspective ability to retrieve the name to
>> which an object is bound?
> 
> Objects aren't bound to names. So, no.
> 
> The binding from a reference (a name is a reference) to objects is
> one-way.
> 
> See this excellent presentation from PyCon US 2015 by Ned Batchelder
> <URL:https://www.youtube.com/watch?v=_AEJHKGk9ns>.

But my code knows the name. The code is provided the name; I want the 
code to tell me that name.
..but it seems unable to do so.
;-(



More information about the Tutor mailing list