snarl_barx231
Dec 18, 2012 - 01:02
I'm just learning python and oop in particular so I've got some basic questions.
Why doesn't this work:
class Foo:
def init(self, x, y):
self.x = x
self.y = y
bar = Foo(42, 7) <------ here i get the error "this constructor takes no arguments"
print bar.x
hmmmmmm....for some reason this post was stripped of indentation
Thanks!