[Python-ideas] Better Type Hinting

Thomas Güttler guettliml at thomas-guettler.de
Fri Jun 5 07:36:59 CEST 2015


It would be great to have better type hinting in IDEs.

My usecase:

logger = logging.getLogger(__name__)
try:
     ...
except FooException, exc:
     logger.warn('...')


I remember there was a way to show the traceback via logger.warn().

I could use my favorite search engine, but a short cut via the IDE would
be much easier.

How can the IDE know what kind of duck "logger" is?

Many IDEs parse the docstrings, but a lot of code does not provide it.

How can this be improved?

Regards,
   Thomas Güttler

PS: I don't mention the name of my IDE intentionally :-)
  It does not matter for this question.


More information about the Python-ideas mailing list