On Tuesday, March 28, 2017 at 3:09:45 AM UTC-5, loial wrote:
> Can I pass self(or all its variables) to a class?
> Basically, how do I make all the variables defined in self
> in the calling python script available to the python class
> I want to call?
Your question, as presented, is difficult to
On 3/28/2017 4:09 AM, loial wrote:
Can I pass self(or all its variables) to a class?
In Python, every argument to every function is an instance of some
class. The function can access any attribute of the arguments it
receives with arg.attribute.
--
Terry Jan Reedy
--
https://mail.python.o
loial wrote:
> Can I pass self(or all its variables) to a class?
>
> Basically, how do I make all the variables defined in self in the calling
> python script available to the python class I want to call?
Inside a method you can access attributes of an instance as self.whatever:
>>> class A:
..
Can I pass self(or all its variables) to a class?
Basically, how do I make all the variables defined in self in the calling
python script available to the python class I want to call?
--
https://mail.python.org/mailman/listinfo/python-list