New submission from Alex Waygood <alex.wayg...@gmail.com>:

`functools.singledispatchmethod` is marked as being a generic class in 
`typeshed`, but does not define `__class_getitem__`, so cannot be parameterized 
at runtime.

cpython source code: 
https://github.com/python/cpython/blob/e2063d6a1ebc3568e90a14ed163fa291b5977ae8/Lib/functools.py#L891

typeshed stub: 
https://github.com/python/typeshed/blob/f4143c40e85db42dc98549e09329e196668395ee/stdlib/functools.pyi#L94

----------
components: Library (Lib)
messages: 405462
nosy: AlexWaygood, lukasz.langa, rhettinger
priority: normal
severity: normal
status: open
title: `functools.singledispatchmethod` does not define `__class_getitem__`
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45684>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to