Good point. We get lazy when reviewing these things. Feel free to fix it!

On 7/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>     >> Run 2to3 over the Demo/ directory to shut up parse errors from 2to3
>     >> about lingering print statements.
>
>     Skip> Shouldn't the list(dictionary.keys()) construct only be applied
>     Skip> where it's needed?
>
>     Guido> Yeah, but the tool doesn't know when it is or isn't needed. You'd
>     Guido> think that "for x in d.keys(): ..." would be a context where it's
>     Guido> certainly not needed, but that's (alas) not true -- if the loop
>     Guido> body modifies d, the list() call is needed. See various other
>     Guido> recent checkins.
>
> I wasn't complaining about the tool.  I fully expect it to wrap d.keys()
> calls in list().  I thought the list() call should have been removed before
> checking in the file though.
>
> Skip
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to