optional types

Peter Otten __peter__ at web.de
Wed Oct 29 12:51:46 EDT 2014


Kiuhnm wrote:

> I must say that the lack of static types in Python is a pain in the neck
> especially when I'm exploring new libraries. Recently, I learned a new
> language called Dart which have optional typing and I had a lot of fun
> with it. Basically, you use type annotations as documentation and to give
> useful information to the IDE or editor. That makes the IDE look *very*
> smart! I'm using PyCharm and more often than not I want to see the list of
> methods and attributes of an object, but the editor won't show them to me
> because it doesn't know the dynamic type of the variable whose value was
> just returned by a function. That's irritating! Am I the only one who'd
> like to see optional types introduced in Python?

Personally I am skeptical, but there is an effort underway:

http://www.mypy-lang.org/
https://mail.python.org/pipermail/python-ideas/2014-August/028742.html

Nothing that your search engine of choice could not have found you...




More information about the Python-list mailing list