Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
class empty(object):
|
||||
pass
|
||||
e = empty()
|
||||
|
|
@ -0,0 +1 @@
|
|||
e.foo = 1
|
||||
|
|
@ -0,0 +1 @@
|
|||
setattr(e, name, value)
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
class empty(object):
|
||||
def __init__(this):
|
||||
this.foo = "whatever"
|
||||
|
||||
def patch_empty(obj):
|
||||
def fn(self=obj):
|
||||
print self.foo
|
||||
obj.print_output = fn
|
||||
|
||||
e = empty()
|
||||
patch_empty(e)
|
||||
e.print_output()
|
||||
# >>> whatever
|
||||
Loading…
Add table
Add a link
Reference in a new issue