newbie question re classes and self

Terry Reedy tjreedy at udel.edu
Tue Mar 28 09:44:57 EDT 2017


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




More information about the Python-list mailing list