I have a file x.py and another file y.py
I have a class x in x.py and it has a function defined as:
@property
def x(self):
return self._x
@x.setter
def x(self, x):
self.update_x(x)
def xy(self, l):
self._x = 100
Now I want to use this value in the other file y.py
Where I have:
from models.x import X # where X is the name of the class in x.py
def functionX(self):
y = # set this value as the value of x in function x from x.py
How can I do this?
Xbefore you can access its non-static methods... Can I also suggest using less confusing names? A class namedX(or is itx? You used it both ways.) in a file namedxthat has a function namedxthat returns_xis not exactly easy to comprehend at first glance.