Python is DOOMED! Again!

Mark Lawrence breamoreboy at yahoo.co.uk
Tue Jan 27 12:40:32 EST 2015


On 27/01/2015 17:26, random832 at fastmail.us wrote:
> On Tue, Jan 27, 2015, at 01:36, Steven D'Aprano wrote:
>> I consider return type to be part of the function signature. The
>> signature
>> of a function is the parameters it accepts and the result it returns.
>
> It's part of it, but not the whole of it, and early C compilers had no
> information about the parameters except from the call site itself. You
> could even call the same function multiple different ways (this was
> later formalized with variadic functions).
>

Back to that old Whitesmith's compiler.  It's certainly very interesting 
to see what the assembler looks like when you forget the ampersand, the 
compiler doesn't throw an error, and so the entire structure instead of 
a single pointer gets passed into your function.  Not so much passed by 
value, or reference, or object, but complete foul up :)

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list