% is not an operator [was Re: Verbose and flexible args and kwargs syntax]
MRAB
python at mrabarnett.plus.com
Thu Dec 15 21:58:40 EST 2011
On 16/12/2011 02:14, alex23 wrote:
> Eelco<hoogendoorn.ee... at gmail.com> wrote:
>> To tie it back in with python language design; all the more reason
>> not to opt for pseudo-backwards compatibility. If python wants a
>> remainder function, call it 'remainder'. Not 'rem', not 'mod', and
>> certainly not '%'.
Python has "def", "del", "int", "str", "len", and so on. "rem" or "mod"
(Ada has both, I believe) would be in keeping with the language.
>
> Good luck with the PEP.
>
>> Its the more pythonic way; a self-describing name, rather than
>> poorly defined or poorly understood cryptology.
>
> "Although practicality beats purity."
>
> I'm still utterly agog that anyone finds the operator % confusing.
In financial circles it could be an operator for calculating
percentages, eg. "5 % x" would be 5 percent of x.
It's an oddity, but an established one. :-)
More information about the Python-list
mailing list