[Tutor] user-given variable names for objects
Luke Paireepinart
rabidpoobear at gmail.com
Fri Dec 14 00:50:17 CET 2007
On Dec 13, 2008 3:12 PM, Tiger12506 <keridee at jayco.net> wrote:
> I may sound like a know-it-all, but dictionaries *are* iterators.
I'm used to that from you :P
>
> [a for a in eventData if eventData[a] < time.time()]
>
> This is more efficient. The keys method creates a list in memory first and
> then it iterates over it.
Thanks. I was fairly certain that was the case, but since I wasn't going to
test the code, I used the alternative.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071213/95c1de19/attachment.htm
More information about the Tutor
mailing list