dmitrey wrote:
> Hi all,
> I'm rewriting some code from other language to Python; can anyone
> explain me which way is the simpliest:
> I have
> class C1():
> def __init__(self):
> self.a = 5
>
> class C2(C1):
> def __init__(self):
> self.b = 8
>
> c = C2()
> print c.b#
dmitrey schrieb:
> Hi all,
> I'm rewriting some code from other language to Python; can anyone
> explain me which way is the simpliest:
> I have
> class C1():
> def __init__(self):
> self.a = 5
>
> class C2(C1):
> def __init__(self):
> self.b = 8
>
> c = C2()
> print c.
Hi all,
I'm rewriting some code from other language to Python; can anyone
explain me which way is the simpliest:
I have
class C1():
def __init__(self):
self.a = 5
class C2(C1):
def __init__(self):
self.b = 8
c = C2()
print c.b#prints 8
print c.a#prints error, because fi