Files
codeql/python/ql/test/experimental/attrs/test.py
2022-02-02 11:19:35 +01:00

14 lines
305 B
Python

# This file is a simple test of which nodes are included with AttrRead/AttrWrite.
# For actual data-flow tests, see fieldflow/ dir.
class MyObj(object):
def __init__(self, foo):
self.foo = foo
myobj = MyObj("foo")
myobj.foo = "bar"
myobj.foo
setattr(myobj, "foo", 42)
getattr(myobj, "foo")