[issue18032] Optimization for set/frozenset.issubset()

2015-05-27 Thread Bruno Cauet
Bruno Cauet added the comment: Serhiy, that sounds good but I think that you have forgotten to attach the mentioned patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18032

[issue23640] Enum.from_bytes() is broken

2015-03-30 Thread Bruno Cauet
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 should override

[issue23640] Enum.from_bytes() is broken

2015-03-12 Thread Bruno Cauet
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 ValueError

[issue23640] Enum.from_bytes() is broken

2015-03-12 Thread Bruno Cauet
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-a-pseudo-int

[issue23192] Generator return value ignored in lambda function

2015-03-11 Thread Bruno Cauet
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 tracker rep

[issue23192] Generator return value ignored in lambda function

2015-03-02 Thread Bruno Cauet
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 RETURN_VALUE 1457: ADDOP_O

[issue23192] Generator return value ignored in lambda function

2015-03-02 Thread Bruno Cauet
Changes by Bruno Cauet brunoca...@gmail.com: Added file: http://bugs.python.org/file38299/0002-lambda-generator-fix-try-to-add-a-dis-test.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23192

[issue1703178] link_objects in setup.cfg crashes build

2014-12-09 Thread Bruno Cauet
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 -- nosy: +bru

[issue23017] string.printable.isprintable() returns False

2014-12-09 Thread Bruno Cauet
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: +Python 3.5

[issue18032] Optimization for set/frozenset.issubset()

2014-11-27 Thread Bruno Cauet
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 most part (argument is a set