[Python-Dev] float atime/mtime/ctime - a bad idea? (original) (raw)

Barry A. Warsaw barry@python.org
Tue, 15 Oct 2002 22:09:47 -0400


"GvR" == Guido van Rossum <guido@python.org> writes:

GvR> Maybe we can introduce a variant of the stat() function that
GvR> returns floats, or alternative field names that are only
GvR> available when using attributes (not when using the tuple-ish
GvR> API)?

+1 on the latter idea. Since the st_mtime, st_atime, and st_ctime attributes, and the tuple-ish API are documented as returning ints, I think you shouldn't change that. Provide different field names for float values, e.g. f_mtime, f_ctime, f_atime, or maybe just mtime, atime, and ctime... ?

-Barry