[Types-sig] check.py (was: PyDL RFC 0.02)
Martijn Faassen
m.faassen@vet.uu.nl
Tue, 04 Jan 2000 14:26:51 +0100
Tim Peters wrote:
>
> [Paul Prescod]
> > My syntax is mostly based on your {GregS's] web page. I switched
> > "!" for "as" based on my belief that it isn't Pythonic to use
> > random keyboard characters in ways that are not universally
> > understood...
>
> FYI, in Common Lisp the name of this function is the delightful "the"; e.g.,
>
> (the integer (somefunc i))
>
> looks at the value returned by (somefunc i), passes it along if it's an
> integer, else raises an error.
>
> and-some-people-say-lisp-is-unreadable<wink>-ly y'rs - tim
Neat!
def foo(a the Integer, b the String, c the Foo, d the Any) the Integer:
e = d the Integer
return e
I could definitely live with that one. Doesn't have the semantic
confusion that 'as' have and it seems readable.
Regards,
Martijn