[issue21964] inconsistency in list-generator comprehension with yield(-from)

2014-07-14 Thread hakril
hakril added the comment: I found something else, I think it worth mentioning it. This side-effect allows to create generators that return other values that None. And the CPython's behavior is not the same for all versions: {(yield i) : i for i in range(2)} generator object dictcomp

[issue21964] inconsistency in list-generator comprehension with yield(-from)

2014-07-11 Thread hakril
New submission from hakril: Will playing with generators and `yield from` I found some inconsistency. list comprehension with yield(-from) would return a generator. generator comprehension would yield some None in the middle of the expected values. Examples: l = [abc, range(3)] g1

[issue21947] `Dis` module doesn't know how to disassemble generators

2014-07-09 Thread hakril
New submission from hakril: The `dis` module doesn't know how to disassemble generator object because it has no idea about the `gi_code` attribute. I made a (very) little patch to change this behavior. If there is a valid reason to not let the `dis` module disassemble generator, I would

[issue21947] `Dis` module doesn't know how to disassemble generators

2014-07-09 Thread hakril
hakril added the comment: Here is a try for a better patch. Added a unit test and updated the doc. -- Added file: http://bugs.python.org/file35918/dis_generator2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21947