If I create a class A
as follows:
class A:
def _ _init_ _(self):
self.name = 'A'
Inspecting the _ _dict_ _
member looks like {'name': 'A'}
If however I create a class B
:
class B:
name = 'B'
_ _dict_ _
is empty.
What is the difference between the two, and why doesn't name
show up in B
's _ _dict_ _
?