Python3 - How do I import a class from another file

Python python at python.invalid
Tue Dec 10 07:54:44 EST 2019


R.Wieser wrote:
> Chris,
...
> 
> But, as you mentioned, I do not know (all) the facts.  Please do present
> them.   Maybe there is a logic in there I do not yet see.

We may, but then you wrote:

>> Check out the 'with' statement.
> 
> I'm sorry, but nope.
> 
> Rule one: When debugging do *not* throw more stuff at a problem than what is
> neccessary to make it show its ugly head.
> Rule two: When in doubt, see rule One. :-)

which contradicts your previous statement.

"with" is "more stuff" it is the right way to deal with disposable
ressource in the first place. In the documentation it is used from
the very first example of, say, open().




More information about the Python-list mailing list