Python: Getting the attribute name that the created object will be given
- by cool-RR
Before I ask this, do note: I want this for debugging purposes. I know that this is going to be some bad black magic, but I want to use it just during debugging so I could identify my objects more easily.
It's like this. I have some object from class A that creates a few B instances as attributes:
class A(object):
def __init__(self)
…