[issue37770] implement __reversed__ on reversed types

2019-08-05 Thread Jason Curtis
Change by Jason Curtis : -- title: reversed class should implement __reversed__ -> implement __reversed__ on reversed types ___ Python tracker <https://bugs.python.org/issu

[issue37770] reversed class should implement __reversed__

2019-08-05 Thread Jason Curtis
Jason Curtis added the comment: Ok, not so sure about the PR now; I dug around and realized this is a C implementation and my C is likely not strong enough! -- ___ Python tracker <https://bugs.python.org/issue37

[issue37770] reversed class should implement __reversed__

2019-08-05 Thread Jason Curtis
New submission from Jason Curtis : I've just been trying to implement some logic which potentially involves reversing things back to their initial orders, and it'd be nice to just be able to call reversed() on something that has already been reversed. >>> reversed(reversed

[issue37479] IntEnum __format__ behavior can't be overridden through __str__

2019-07-01 Thread Jason Curtis
Change by Jason Curtis : -- title: IntEnum f-string behavior can't be overridden -> IntEnum __format__ behavior can't be overridden through __str__ ___ Python tracker <https://bugs.python.org/issu

[issue37479] IntEnum f-string behavior can't be overridden

2019-07-01 Thread Jason Curtis
Jason Curtis added the comment: related cPython code: https://github.com/python/cpython/blob/19a1e1eb86115db66c1faae5927f87e3a12692fc/Lib/enum.py#L626 If we're in a mixed-in class but the class has overridden __str__(), we should probably use str(self) instead of self._value_

[issue37479] IntEnum f-string behavior can't be overridden

2019-07-01 Thread Jason Curtis
Jason Curtis added the comment: I mistyped - __str__ can be overridden effectively, but __format__ has to be overridden instead or overridden also to get the desired f-string behavior. -- ___ Python tracker <https://bugs.python.org/issue37

[issue37479] IntEnum f-string behavior can't be overridden

2019-07-01 Thread Jason Curtis
New submission from Jason Curtis : Combining int and Enum, as with enum.IntEnum results in a class where __str__ cannot be effectively overridden. For example: from enum import IntEnum class myIntEnum(IntEnum): x = 1 def __str__(self): return 'AAAa' f

[issue29229] incompatible: unittest.mock.sentinel and multiprocessing.Pool.map()

2017-01-10 Thread Jason Curtis
Jason Curtis added the comment: sounds right; closing as a duplicate of issue20804 -- resolution: -> duplicate status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29229] incompatible: unittest.mock.sentinel and multiprocessing.Pool.map()

2017-01-10 Thread Jason Curtis
New submission from Jason Curtis: When a sentinel object from unittest.mock.sentinel is passed through a multiprocessing.Pool.map, I expect it to still be comparable. As a user, I'd like to be able to write a unit test using sentinels on my unparallelized code, and then see that the test

[issue22955] Pickling of methodcaller, attrgetter, and itemgetter

2016-05-16 Thread Jason Curtis
Jason Curtis added the comment: This is still an issue with operator.attrgetter in 3.4.3, even after clearing sys.modules['_operator']: $ python3 Python 3.4.3 (default, Oct 14 2015, 20:28:29) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or