osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python3 - How do I import a class from another file


On 12/12/19 2:17 pm, Python wrote:
> I was very impressed back in the day when the
> with statement and context manager protocol appeared in
> Python. I've always wondered from what language(s) it was
> borrowed from

It was partly inspired by the RAII pattern often used
in C++, but as far as I know, all the details are unique
to Python. Some other languages have a "with" statement,
but it does something completely different.

-- 
Greg