I see the chicken and egg problem here.
If we are talking about typing module usage -- typeshed is the type
hints provider.
If PyCharm doesn't want to use it -- it is not CPython problem.

I think there is no need to change python code itself but used tooling.

On Mon, Apr 22, 2019 at 11:06 PM Brett Cannon <br...@python.org> wrote:
>
>
>
> On Sat, Apr 20, 2019 at 2:10 PM Inada Naoki <songofaca...@gmail.com> wrote:
>>
>> "import typing" is slow too.
>
>
> But is it so slow as to not do the right thing here and use the 'typing' 
> module as expected? If you have so much work you need to launch some threads 
> or processes to deal with it then a single import isn't going to be your 
> biggest bottleneck.
>
> -Brett
>
>>
>>
>> 2019年4月21日(日) 1:43 Ilya Kamenshchikov <ikamenshchi...@gmail.com>:
>>>
>>> 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.
>>
>> _______________________________________________
>> 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/brett%40python.org
>
> _______________________________________________
> 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/andrew.svetlov%40gmail.com



-- 
Thanks,
Andrew Svetlov
_______________________________________________
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-archive.com

Reply via email to