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

Ethan Furman ethan at stoneleaf.us
Wed Jun 12 20:30:36 EDT 2013


On 06/12/2013 05:04 PM, Mark Janssen wrote:
> Steven D'Aprono wrote:
>>
>> Apart from Erlang, got any other examples? Because it seems to me that in
>> languages with nested scopes or namespaces, shadowing higher levels is
>> exactly the right thing to do.
>
> Really?
>
>--> int="five"
>--> [int(i) for i in ["1","2","3"]]
> TypeError:  str is not callable
>
> Now how are you going to get the original int type back?

--> del int

Mark Janssen*, you would increase your credibility if you actually *learned* Python.

--
~Ethan~

*full name used to distinguish from at least one other Mark on the list.



More information about the Python-list mailing list