[issue13595] Weird behavior with generators with self-referencing output.

2011-12-13 Thread Pyry Pakkanen
New submission from Pyry Pakkanen frostb...@suomi24.fi: The following self-referencing generator has incorrect output: def ab_combinations(): #'', 'a', 'b', 'aa', 'ab', 'ba', 'bb', 'aaa', ... def _deferred_output(): yield tees = tee(output) #This definition

[issue13595] Weird behavior with generators with self-referencing output.

2011-12-13 Thread Pyry Pakkanen
Pyry Pakkanen frostb...@suomi24.fi added the comment: Oh, I was sure it had to do with binding issues. I just couldn't put my finger on it because the behavior seemed so counterintuitive. Thanks for clearing things up. I can now work around this feature

[issue13454] crash when deleting one pair from tee()

2011-11-22 Thread Pyry Pakkanen
New submission from Pyry Pakkanen frostb...@suomi24.fi: Running the following results in a Segmentation fault on Ubuntu 11.10 64-bit with both python and python3. from itertools import * c = count() a,b = tee(c) for i in range(1000): next(a) del(b) -- messages: 148124 nosy: PyryP

[issue3753] bytearray incompatible with bytes

2008-09-01 Thread Pyry Pakkanen
New submission from Pyry Pakkanen [EMAIL PROTECTED]: I was expecting that the API function PyArg_ParseTuple(args, y#:foo, cp, size) would accept a bytearray and implicitly convert it to bytes. Currently it throws the error: TypeError: foo() argument 1 must be bytes or read-only buffer