Skip to content

Instantly share code, notes, and snippets.

@maluta
Created February 27, 2010 03:19
Show Gist options
  • Save maluta/316440 to your computer and use it in GitHub Desktop.
Save maluta/316440 to your computer and use it in GitHub Desktop.
class Foo:
def __init__(self,p):
print "__init2__"
def __init__(self): # tem prioridade
print "__init__"
def function(self, param):
print "function with 1 parameter"
def function(self, param1, param2):
print "function with 2 parameters"
def function(self): # a mesma coisa
print "function without parameters"
x = Foo()
x.function()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment