On Sep 3, 8:09 pm, Scott <[EMAIL PROTECTED]> wrote:
> Let's say I have an object:
>
> class foo():
> def create_another()
> return foo()
>
> def blah():
> x = self.create_another()
> ... do something with X
>
> Now I create a inherited class of this object:
>
> class bar(
Scott a écrit :
Let's say I have an object:
s/object/class/
class foo():
def create_another()
return foo()
class Foo(object):
def create_another(self):
return Foo()
def blah():
def blah(self):
x = self.create_another()
... do something with X
On Sep 3, 12:09 pm, Scott <[EMAIL PROTECTED]> wrote:
> Let's say I have an object:
>
> class foo():
> def create_another()
> return foo()
>
> def blah():
> x = self.create_another()
> ... do something with X
>
> Now I create a inherited class of this object:
>
> class bar
Let's say I have an object:
class foo():
def create_another()
return foo()
def blah():
x = self.create_another()
... do something with X
Now I create a inherited class of this object:
class bar(foo):
...
If I call bar.create_another(), it will return a foo() inst