On Tue, 07 Aug 2012 08:30:15 -0700, Thomas Draper wrote:
> I want to use with..as in a "reversible circuit generator". However, it
> seems that @contextmanager changes the expected nature of the class. I
> tried to distill the problem down to a simple example.
Nothing to do with contextmanager. T
Thomas Draper wrote:
> I want to use with..as in a "reversible circuit generator". However, it
> seems that @contextmanager changes the expected nature of the class. I
> tried to distill the problem down to a simple example.
>
> import contextlib
>
> class SymList:
The problem you experience ha
I want to use with..as in a "reversible circuit generator". However, it seems
that @contextmanager changes the expected nature of the class. I tried to
distill the problem down to a simple example.
import contextlib
class SymList:
def __init__(self, L=[]):
self.L = L
@contextli