New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

There is a difference between typing.Callable and collections.abc.Callable.

>>> import typing, collections.abc
>>> T = typing.TypeVar('T')
>>> C1 = typing.Callable[[T], T]
>>> C2 = collections.abc.Callable[[T], T]
>>> C1
typing.Callable[[~T], ~T]
>>> C2
collections.abc.Callable[[~T], ~T]
>>> C1[int]
typing.Callable[[int], int]
>>> C2[int]
collections.abc.Callable[[~T], int]

----------
components: Library (Lib)
messages: 368015
nosy: gvanrossum, levkivskyi, serhiy.storchaka
priority: normal
severity: normal
status: open
title: collections.abc.Callable and type variables
type: behavior
versions: Python 3.9

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

Reply via email to