[Python-ideas] Proposal: Use mypy syntax for function annotations
Juancarlo Añez
apalala at gmail.com
Thu Aug 14 19:17:48 CEST 2014
On Thu, Aug 14, 2014 at 12:04 PM, Manuel Cerón <ceronman at gmail.com> wrote:
> For example:
>
> interface Named {
> name: string;
> say(): string;
> }
>
> function doSomething(x: Named) {
> console.log(x.name);
> }
>
> doSomething({name: "hello", say: function() { return this.name }}); // OK
> doSomething({something: "hello"}); // ERROR
>
That is so Java....!
--
Juancarlo *Añez*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140814/db3c76fd/attachment.html>
More information about the Python-ideas
mailing list