Message132483
> For 3.3, the fix could be generalised with ContextDecorator supporting a documented "self._recreate" internal interface that, by default, just returns self, but would be overridden in _GeneratorContextManager to actually create a new instance. The custom __call__ implementation for _GeneratorContextManager could then be removed.
How about directly using the existing "copy.copy()" semantics instead of self._recreate()? That is, call "with copy.copy(self)" instead of "with self" in ContextGenerator.__call__(), implement ContextGenerator.__copy__() method to simply return self, and implement _GeneratorContextManager.__copy__() to create a copy of itself. This saves an internal interface. |
|
Date |
User |
Action |
Args |
2011-03-29 14:24:00 | ysj.ray | set | recipients:
+ ysj.ray, ncoghlan, pitrou, michael.foord |
2011-03-29 14:23:59 | ysj.ray | set | messageid: <1301408639.94.0.683340024863.issue11647@psf.upfronthosting.co.za> |
2011-03-29 14:23:57 | ysj.ray | link | issue11647 messages |
2011-03-29 14:23:57 | ysj.ray | create | |
|