erious question: what should `enumerate.__reversed__`
> do when given a starting value?
>
> reversed(enumerate('abc', 1))
>
> Should that yield...?
>
> # treat the start value as a start value
> (1, 'c'), (0, 'b'), (-1, 'a')
>
> # treat the start value as
st express their ideas
differently knowing it doesn't work in straight-forward way.
Best Regards,
--
Ilya Kamenshchikov
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org
Hi,
I needed reversed(enumerate(x: list)) in my code, and have discovered that
it wound't work. This is disappointing because operation is well defined.
It is also well defined for str type, range, and - in principle, but not
yet in practice - on dictionary iterators - keys(), values(), items()
Ok thanks for explaining. I will proceed by trying it with typeshed.
Best Regards,
--
Ilya Kamenshchikov
On Tue, Apr 23, 2019 at 9:44 PM Ivan Levkivskyi
wrote:
> Mypy doesn't use source code of stlib for analysis and instead uses stub
> files from typeshed. IIUC PyCharm can also do tha
, performant
and sufficient code - then perhaps modifying mypy is a reasonable
price to pay.
Perhaps this particular case can be just patched locally by PyCharm
/JetBrains, but what is a general solution to this class of problems?
Best Regards,
--
Ilya Kamenshchikov
On Tue, Apr 23, 2019 at 7:05 PM
alright, so would an import under TYPE_CHECKING guard be an option? like:
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from .process import ProcessPoolExecutor
from .thread import ThreadPoolExecutor
Perhaps we can have both clarity and performance.
and would
indeed be an improvement?
Best Regards,
--
Ilya Kamenshchikov
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail