newb question about @property
Chris Angelico <rosuav at gmail.com>:
> On Mon, Oct 2, 2017 at 5:34 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> I have *seen* a semi-useful decorator in code once
>> (@contextlib.contextmanager) but still would prefer explicit dunder
> [...] I'm not sure where dunder methods come into this, though, as
> they're completely unrelated.
A context manager must implement __enter__() and __exit__().
@contextlib.contextmanager implements them for you.