Bruno Cauet added the comment:
Here is an updated patch based on Dustin's work with Josh's comments. I also
added a test which takes forever on an unpatched python interpreter.
Since it's a performance issue, I've benchmarked the results. They don't change
for the mos
Bruno Cauet added the comment:
There's a small typo in the comments:
+# make sure cmd.link_objects is turned into a list
+# is it's a string
Should be:
+# make sure cmd.link_objects is turned into a list
+# if it's a string
--
Bruno Cauet added the comment:
Here is a simple fix for the issue, plus a test.
It does not break any unit test but this raises a backwards-compatibility
problem. Therefore I wouldn't advise using it for Python 3.4 but only 3.5+.
--
keywords: +patch
nosy: +bru
versions: +Pytho
Bruno Cauet added the comment:
Serhiy, that sounds good but I think that you have forgotten to attach the
mentioned patch.
--
___
Python tracker
<http://bugs.python.org/issue18
Bruno Cauet added the comment:
Here are the operations being emitted (line, macro used and eventual argument):
>>> f = lambda: (yield 5)
3487: ADDOP_O LOAD_CONST e->v.Num.n
3472: ADDOP YIELD_VALUE
1907: ADDOP_IN_SCOPE POP_TOP
4349: ADDOP_O LOAD_CONST Py_None
4350: ADDOP RETUR
Changes by Bruno Cauet :
Added file:
http://bugs.python.org/file38299/0002-lambda-generator-fix-try-to-add-a-dis-test.patch
___
Python tracker
<http://bugs.python.org/issue23
Bruno Cauet added the comment:
Here is a working test, testing yield by lambda & function as well as lambda
and function yielding from those.
--
Added file:
http://bugs.python.org/file38440/0001-Add-tests-for-issue-23192.patch
___
Python tra
Bruno Cauet added the comment:
Hi,
I feel like this behaviour does not only affect IntEnum & related but anything
that inherits from int.
Example:
>>> class foo(int):
... def __init__(self, value, base=10):
... if value == 2:
... raise ValueEr
Bruno Cauet added the comment:
I took the liberty of putting together a small patch which makes from_bytes()
call & return type(value_found) if type != long (Serhiy's & my 2nd solution).
Ethan: in that case, type.from_bytes() would always return an int, and not
resort to build
Bruno Cauet added the comment:
I'm not sure how you can have both, those two seem opposite to me:
- if 'from_bytes' returns the same type as the class it is called on then
the instantiation of the result object should go through its constructor
(patch proposed)
- if the subclass
10 matches
Mail list logo