Classes InstancesCreating a new instancea = Account(1000.00) b = Account(500.00) Method invocationa.deposit(500.00) a.deposit(23.45) a.withdraw(78.20) print a.getbalance() Attribute accessprint a.balance a.balance = 500000.00 Destruction
|
<<< | O'Reilly OSCON 2000, Introduction to Python, Slide 93 July 17, 2000, beazley@cs.uchicago.edu |
>>> |