Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # class_references.py -- no selfies! (inside humor)
- class myClass():
- sales_total = 2548.65
- clothes = ['shirt','hat','pants','shoes','coat']
- #
- def sale(update,item,price):
- update.sales_total += price
- try:
- update.clothes.remove(item)
- except: pass
- sale(myClass,'hat',128.80)
- print myClass.sales_total
- print myClass.clothes
- print dir(myClass)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement