No. Python now has static type checking and IDE auto-complete support. All
you have to do is put the type name in the function declaration.
On Oct 11, 2015 3:45 PM, "Matt Wheeler" <m...@funkyhat.org> wrote:

> On 9 October 2015 at 17:26, John Michael Lafayette
> <johnmichaelreed...@gmail.com> wrote:
> > I would like Python to have a strong typing feature that can co-exist
> with
> > the current dynamic typing system. Currently Python is like this:
> >
> >     var animal = Factory.make("dog")  # okay.
> >     var dog = Factory.make("dog")       # okay.
> >     var cat = Factory.make("dog")        # are you sure?
> >
> > I would like Python to also be able to also do this:
> >
> >     Animal a = Factory.make("dog")    # okay. Dog is Animal.
> >     Dog d = Factory.make("dog")         # okay. Dog is Dog.
> >     Cat c = Factory.make("cat")           # Runtime error. Dog is not
> Cat.
>
> Though it's intended for performance optimisation rather than simply
> static typing for static typing's sake, you could probably use Cython
> to achieve what you want...
>
> ...but then you might start to see the benefits of dynamic typing :)
>
>
> --
> Matt Wheeler
> http://funkyh.at
>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to