anomaly
Gregory Ewing
greg.ewing at canterbury.ac.nz
Tue May 12 20:19:19 EDT 2015
Antoon Pardon wrote:
> But that doesn't answer the question why the developers chose "True" to be a
> keyword and "int" to be a looked-up name.
Probably because True, False and None are very frequently
used constants. Making them keywords means that things
like 'while True:' don't incur the overhead of a name
lookup every time around the loop.
The same doesn't apply to other built-in names, which
are used much less frequently.
--
Greg
More information about the Python-list
mailing list