Terry Reedy wrote:
Not supporting iterables makes it harder to write a class which is
inherently usable in a with block, though. The natural way to make
iterable classes is to use 'yield' in the definition of __iter__ - if
iter() is not called, then that trick can't be used.
If you're defining i
Fredrik Lundh wrote:
Regardless, I believe that solving generator finalization (calling all
enclosing finally blocks in the generator) is a worthwhile problem to
solve. Whether that be by PEP 325, 288, 325+288, etc., that should be
discussed. Whether people use it as a pseudo-block, or decide tha
[Brian Sabbey]
> >> If suites were commonly used as above to define properties, event handlers
> >> and other callbacks, then I think most people would be able to comprehend
> >> what the first example above is doing much more quickly than the second.
[Fredrik]
> > wonderful logic, there. good lu
Fredrik Lundh wrote:
Brian Sabbey wrote:
If suites were commonly used as above to define properties, event handlers
and other callbacks, then I think most people would be able to comprehend
what the first example above is doing much more quickly than the second.
wonderful logic, there. good luck