Newbie: question regarding references and class relationships
Dave Angel
davea at davea.name
Mon Jun 10 19:26:18 EDT 2013
On 06/10/2013 06:54 PM, Chris Angelico wrote:
> On Tue, Jun 11, 2013 at 8:39 AM, Grant Edwards <invalid at invalid.invalid> wrote:
>> On 2013-06-10, Terry Jan Reedy <tjreedy at udel.edu> wrote:
>>
>>> Another principle similar to 'Don't add extraneous code' is 'Don't
>>> rebind builtins'.
>>
>> OK, we've all done it by accident (especially when starting out), but
>> are there people that rebind builtins intentionally?
>
> There are times when you don't care what you shadow, like using id for
> a database ID.
>
> ChrisA
>
And times where you're deliberately replacing a built-in
try:
input = raw_input
except ....
--
DaveA
More information about the Python-list
mailing list