New submission from Kaleb Barrett :
Currently the __repr__ for TypeVar includes the variance information and the
type name (for example ~T, +T_co, -T_contra), but it does not contain bound or
constraint information. I'm not sure what value including variance but not
bound information i
Kaleb Barrett added the comment:
Ah, this was implemented for 3.10 as a part of PEP 604.
https://www.python.org/dev/peps/pep-0604/#isinstance-and-issubclass.
Feel free to close.
--
___
Python tracker
<https://bugs.python.org/issue44
Change by Kaleb Barrett :
--
title: make Event and Awaitable -> make Event an Awaitable
___
Python tracker
<https://bugs.python.org/issue44373>
___
___
Python-
New submission from Kaleb Barrett :
I have type aliases of Unions like so:
Request = Union[WriteRequest, ReadRequest]
I'd like to be able to use "Request" in an isinstance check rather than having
to duplicate the information in a tuple to pass to the check. Currently I
New submission from Kaleb Barrett :
Following on from https://bugs.python.org/issue33544. I don't agree with the
original suggestion to deprecate the wait() method on Events, but I do agree
that Event should be made Awaitable. Doing so would make code more expressive,
but more import
Kaleb Barrett added the comment:
And so it is... There is also a PR open with a solution from 2017.
https://github.com/python/cpython/pull/4378/files. Can this get reviewed?
The rationalizations against solving this bug stated in the original issue are
weak, range.index *is* useful. I use
New submission from Kaleb Barrett :
The range builtin type is a collections.abc.Sequence, which in Python 3.5 added
the optional start and stop arguments to the index method of Sequences.
However, range.index does not support these optional arguments required by
Sequence.
I noticed this
New submission from Kaleb Barrett :
Having to return `NotImplemented` (which counts as a successful function call)
in `functools.lru_cache` and `functools.cache` decorated binary dunder methods
has the potential to fill the LRU cache with calls that will in ultimately
result in errors (read