Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # func_with_attributes.py -- maybe same as the class_references.py
- def hello_world():
- pass
- def demo(change):
- change.mylist.append('xyz')
- change.mystring += ' Lengthened'
- change.myint *= 20
- hello_world.mylist = [1,2,3,'abc']
- hello_world.mystring = 'Just A String'
- hello_world.myint = 5
- demo(hello_world)
- print hello_world.mylist
- print hello_world.mystring
- print hello_world.myint
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement