On Thu, Aug 23, 2012 at 2:11 PM, Steven D'Aprano
<steve+comp.lang.pyt...@pearwood.info> wrote:
> On Thu, 23 Aug 2012 12:02:16 +1000, Chris Angelico wrote:
>
>> 2) Related to the above, you can infinitely nest scopes. There's nothing
>> wrong with having six variables called 'q'; you always use the innermost
>> one. Yes, this can hurt readability
>
> Well, there you go. There *is* something wrong with having six variables
> called 'q'.

But it's the same thing that's wrong with having one variable called
'q', when that variable would be better called 'invoice' because it's
iterating over your invoices, or 'item' when it's iterating over the
lines of one invoice. Python doesn't stop you from doing that; it's
not the language's job to enforce useful variable names.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to