"Don't rebind built-in names*" - it confuses readers

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Jun 11 09:34:55 EDT 2013


On Tue, 11 Jun 2013 04:12:38 -0700, rusi wrote:

[...]
> then what the message of the Guido-quote is, is not clear (at least to
> me).

The relevant part is in the bit that you deleted. Let me quote it for you 
again:

    "locals hiding built-ins is okay"
    -- Guido van Rossum, inventor and BDFL of Python

[deadpan]
Sorry for such a long quote, and I realise it's quite tricky to 
interpret, so let me summarise for anyone still having difficulty:

GvR is saying that it's okay to use the names of built-in functions or 
types as the names of local variables, even if that causes the built-in 
to be inaccessible within that function.


-- 
Steven



More information about the Python-list mailing list