mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
py/objtype: Handle __dict__ attribute when type has no locals.
This commit is contained in:
committed by
Damien George
parent
880875bea1
commit
b137d064e9
@@ -17,3 +17,8 @@ class Foo:
|
||||
|
||||
d = Foo.__dict__
|
||||
print(d["a"], d["b"])
|
||||
|
||||
|
||||
# dict of a class that has no locals_dict (return empty dict).
|
||||
d = type(type('')).__dict__
|
||||
print(d is not None)
|
||||
|
||||
Reference in New Issue
Block a user