3c014a67ea
Note that even though wrapped in MICROPY_CPYTHON_COMPAT, it is not fully compatible because the modifications to the dictionary do not propagate to the actual instance members.
12 lines
169 B
Python
12 lines
169 B
Python
class A:
|
|
def __init__(self):
|
|
self.a=1
|
|
self.b=2
|
|
|
|
try:
|
|
d=A().__dict__
|
|
print(d['a'])
|
|
print(d['b'])
|
|
except AttributeError:
|
|
print("SKIP")
|