Permalink
Browse files

Add pep8 and encode

  • Loading branch information...
1 parent f7e6748 commit 4fc27b7cb17346895647d2a07471ff5f3415e583 @avelino avelino committed Nov 24, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 examples/classes.py
View
@@ -1,12 +1,24 @@
+# -*- coding: utf-8 -*-
+
class BankAccount(object):
+
def __init__(self, initial_balance=0):
+
self.balance = initial_balance
+
def deposit(self, amount):
+
self.balance = self.balance + amount
+
def withdraw(self, amount):
+
self.balance = self.balance - amount
+
def overdrawn(self):
+
return self.balance < 0
+
+
print BankAccount
my_account = BankAccount(15)
print my_account

0 comments on commit 4fc27b7

Please sign in to comment.