kopia lustrzana https://github.com/micropython/micropython-lib
8 wiersze
107 B
Python
8 wiersze
107 B
Python
|
import operator
|
||
|
|
||
|
class A: pass
|
||
|
a = A()
|
||
|
a.name = "foo"
|
||
|
f = operator.attrgetter('name')
|
||
|
assert f(a) == "foo"
|