Python Context Managers
Introduction One of the most “obscure” features of Python that almost all Python programmers use, even the beginner ones, but don’t really understand, is context managers. You’ve probably seen them in the form of with statements, usually first encountered when you learn opening files in Python. Although context managers seem a little strange at first, when we really dive into them, understand the motivation and techniques behind it, we get access to a new weapon in our programming arsenal. So […]
Read more