The problem with "as" [was "Re: PEP 318"]
Stephen Horne
steve at ninereeds.fsnet.co.uk
Tue Mar 23 19:34:03 EST 2004
On Tue, 23 Mar 2004 15:56:39 +0100, Marco Bubke <marco at bubke.de>
wrote:
>I like :
>def foo(x=42:int, y=3.14:float) [return(string)]:
>
>
>def foo[return(string)](x=42:int, y=3.14:float):
>
>looks strange to me. Its very unreadable. Its maybe the first time I really
>disagree with a Idea of Guido. :-)
I kind of agree, but I wonder how much is out of familiarity.
I would use the logic of 'preferring the return type at the end', and
perhaps cite Ada, Pascal, Modula 2, etc (Algol as well?) as examples
to follow. But then why do I have no problem with C, C++, Java, C# etc
where the type of the return value usually comes first?
--
Steve Horne
steve at ninereeds dot fsnet dot co dot uk
More information about the Python-list
mailing list