Find day of week from month and year
Peter Hansen
peter at engcorp.com
Sat Sep 3 11:40:29 EDT 2005
Paul Rubin wrote:
> Peter Hansen <peter at engcorp.com> writes:
>
>>(And, if I were "optimizing", I would of course dispense with the
>>dynamic creation of the static table upon every execution of
>>expiration(), and move it outside the function.)
>
> Replacing it with a tuple might be enough for that.
You're right, and in fact that would actually be even faster since then
it's a LOAD_CONST instead of a LOAD_GLOBAL.
-Peter
More information about the Python-list
mailing list