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

2011-12-13 Thread Pyry Pakkanen
Pyry Pakkanen 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. -- ___ P

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

2011-12-13 Thread Pyry Pakkanen
New submission from Pyry Pakkanen : The following self-referencing generator has incorrect output: def ab_combinations(): #'', 'a', 'b', 'aa', 'ab', 'ba', 'bb', 'aaa', ... def _deferred_output():

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

2011-11-22 Thread Pyry Pakkanen
New submission from Pyry Pakkanen : 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 priority: normal

[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

[issue3178] __radd__(self, other) isn't called if self and other are of the same class

2008-06-23 Thread Pyry Pakkanen
New submission from Pyry Pakkanen <[EMAIL PROTECTED]>: >>> class test: ... def __radd__(self,other): ... return '__radd__ called' ... >>> t = test() >>> 1 + t '__radd__ called' >>> t + t Traceback (most recent cal