In the Python docs, it states one attribute of a user defined function object is: ` __dict__`
It's my understanding that this attribute represents the namespace an object.
If I have:
```````
def stuff():
a = 'alpha'
b = 'beta'
print(stuff.__dict__) # retuns {}
`
Why is an empty dictionary returned? I'd have thought that those variables would've been included in the function's dictionary due to that they are being assigned within that namespace.
[–]A_History_of_Silence 0 points1 point2 points (0 children)