Python3 - How do I import a class from another file

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Dec 9 05:04:34 EST 2019


On 9/12/19 9:15 pm, R.Wieser wrote:
> To be honest, I was not aware/did not assume that I could delete a class
> definition that way (I even find it a bit weird, but as I'm a newbie in
> regard to Python that does not say much).

Python is very dynamic. The class statement is actually an executable
statement that creates a class object and binds it to a name. There's
nothing stopping you from subsequently rebinding that name to some
other object, or deleting it altogether.

-- 
Greg


More information about the Python-list mailing list