G
Guest
The problem:
I have two classes:
class X:
def __init__(self):
pass
class Y:
def __init__(self):
self.a=1
self.b=X()
and I would like to make 'a' visible inside 'x'. Is there a way to refer to
the Y class from the X? To make things easier , each class is in a
different file, so class X is imported. Or the only way I have is to
pass 'a' as a variable in each method call of 'b' ('a' can take different
values that affect to the behaviour of 'b').
Thanks in advance.
--
Ãngel Gutiérrez RodrÃguez - (e-mail address removed)
Instituto de Ciencia de los Materiales de Madrid - CSIC
SpLine - European Syncrothorn Radiation Facility - Grenoble - France
Postal adress: Departamento de QuÃmica FÃsica y AnalÃtica
Universidad de Oviedo - c/Julián ClaverÃa 8 33006 - Oviedo
Asturias - Spain
E-mail: (e-mail address removed) Telf.: +34-985103687
I have two classes:
class X:
def __init__(self):
pass
class Y:
def __init__(self):
self.a=1
self.b=X()
and I would like to make 'a' visible inside 'x'. Is there a way to refer to
the Y class from the X? To make things easier , each class is in a
different file, so class X is imported. Or the only way I have is to
pass 'a' as a variable in each method call of 'b' ('a' can take different
values that affect to the behaviour of 'b').
Thanks in advance.
--
Ãngel Gutiérrez RodrÃguez - (e-mail address removed)
Instituto de Ciencia de los Materiales de Madrid - CSIC
SpLine - European Syncrothorn Radiation Facility - Grenoble - France
Postal adress: Departamento de QuÃmica FÃsica y AnalÃtica
Universidad de Oviedo - c/Julián ClaverÃa 8 33006 - Oviedo
Asturias - Spain
E-mail: (e-mail address removed) Telf.: +34-985103687