[issue45331] Can create enum of ranges, cannot create range enum. Range should be subclassable... or EnumMeta.__new__ should be smarter.

2021-09-30 Thread Sam Bishop
New submission from Sam Bishop : Range types are perfectly valid as values in an enum, like so. class EnumOfRanges(Enum): ZERO = range(0, 0) RANGE_A = range(1, 11) RANGE_B = range(11, 26) However unlike the other base types , 'int', 'str', 'float&#x

[issue34498] Python 3.7 breaks on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

2018-10-03 Thread Sam Bishop
Sam Bishop added the comment: Would the enhancements to resolve this, by making singledispatch accept more things, also resolve the AssertionError from functools.singledispatch when passing it custom types, or should I raise this as a separate issue

[issue22790] some class attributes missing from dir(Class)

2014-11-04 Thread Sam Bishop
Sam Bishop added the comment: I specified 'during class initialisation' because that was the only case I confirmed. -- ___ Python tracker <http://bugs.python.o

[issue22790] __qualname__ missing from dir(__class__) during class initialisation

2014-11-04 Thread Sam Bishop
New submission from Sam Bishop: The output of performing "dir(__class__)" during a class' __init__ method, seems to be lacking the new '__qualname__' attribute in python 3. This rough test can be pasted right into the python 3.4 REPL to see the issue. Tested on 64bit