[Python-Dev] Concurrent.futures: no type discovery for PyCharm (original) (raw)
Brett Cannon brett at python.org
Mon Apr 22 15:40:42 EDT 2019
- Previous message (by thread): [Python-Dev] Concurrent.futures: no type discovery for PyCharm
- Next message (by thread): [Python-Dev] Concurrent.futures: no type discovery for PyCharm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sat, Apr 20, 2019 at 2:10 PM Inada Naoki <songofacandy at 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 <ikamenshchikov at gmail.com>:
alright, so would an import under TYPECHECKING guard be an option? like:
from typing import TYPECHECKING if TYPECHECKING: from .process import ProcessPoolExecutor from .thread import ThreadPoolExecutor
Perhaps we can have both clarity and performance.
Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/brett%40python.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20190422/0a69b682/attachment.html>
- Previous message (by thread): [Python-Dev] Concurrent.futures: no type discovery for PyCharm
- Next message (by thread): [Python-Dev] Concurrent.futures: no type discovery for PyCharm
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]