> Though you do see 24*60*60 pretty often.
No argument; "doesn't buy much" isn't "doesn't buy anything".
The saving grace in Python is that typical Python users tend to package
functions in modules more than typical Perl users tend to modularize
functions in packages <wink>, and so in Python you'll _usually_ see
_SECONDS_PER_DAY = 24*60*60 # a module-level binding
_SECONDS_PER_WEEK = _SECONDS_PER_DAY * 7 # ditto
def full_days_in_epoch(): # a function supplied by the module
return int(time.time() / _SECONDS_PER_DAY)
The constant expressions aren't optimized away, but module-level code is
executed only once per job (when the module is first imported), so the
constant expressions here are evaluated only once per job.
It's true that a user might pay a significant price for writing
today; seems rare in Python, though.
once<wink>-ly y'rs - tim
Tim Peters email@example.com
not speaking for Kendall Square Research Corp