Verbose and flexible args and kwargs syntax
Eelco
hoogendoorn.eelco at gmail.com
Tue Dec 13 04:26:02 EST 2011
> > Python users generally follow the rule "explicit is better than
> > implicit". Setting a general constraint and letting the language "do
> > the right thing" is a kind of black magic that feels off because it
> > tends to break that rule. But that's not to say that black magic
> > never wins -- just look at super() and the MRO.
>
> We are not talking black magic here; we are talking about an EXPLICIT
> type constraint provided on the very same line.
To hammer that point home: would you say the following C# code
performs 'black magic'?
float x = 3;
After all, exactly the same thing is going on; C# will 'do the right
thing'; convert the integer literal 3 to a floating point value, based
on the type constraint placed on x.
More information about the Python-list
mailing list