Re: The Perils of PyContract (and Generators)

2009-08-05 Thread Nick Daly
On Wed, 5 Aug 2009 03:06 pm Nick Daly wrote: > The problem actually lies in the contract. Generally, the PyContract > shouldn't affect the return values or in any way modify the code, which > it doesn't, as long as the function returns a list values (the way the > code had in fact originally been

Re: The Perils of PyContract (and Generators)

2009-08-05 Thread Steven D'Aprano
On Wed, 5 Aug 2009 03:06 pm Nick Daly wrote: > The problem actually lies in the contract. Generally, the PyContract > shouldn't affect the return values or in any way modify the code, which > it doesn't, as long as the function returns a list values (the way the > code had in fact originally been

The Perils of PyContract (and Generators)

2009-08-04 Thread Nick Daly
So, just in case any body else runs into this strange, strange happening, I thought I might as well document it somewhere Google can find it. Contracts for Python[0] and generators don't necessarily play well together. This mail comes in three parts, first, the example code that didn't work at al