[Python-Dev] Store timestamps as decimal.Decimal objects (original) (raw)
Victor Stinner victor.stinner at haypocalc.com
Tue Jan 31 22:41:39 CET 2012
- Previous message: [Python-Dev] Store timestamps as decimal.Decimal objects
- Next message: [Python-Dev] Store timestamps as decimal.Decimal objects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
(I removed the timespec format, I consider that we don't need it.)
Rather, I guess you removed it because it didn't fit the "types as flags" pattern.
I removed it because I don't like tuple: you cannot do arithmetic on tuple, like t2-t1. Print a tuple doesn't give you a nice output. It is used in C because you have no other choice, but in Python, we can do better.
As I said in another message, another hint that this is the wrong API design: Will the APIs ever support passing in types other than these five? Probably not, so I strongly believe they should not be passed in as types.
I don't know if we should only support 3 types today, or more, but I suppose that we will add more later (e.g. if datetime is replaced by another new and better datetime module).
You mean that we should use a string instead of type, so time.time(format="decimal")? Or do something else?
Victor
- Previous message: [Python-Dev] Store timestamps as decimal.Decimal objects
- Next message: [Python-Dev] Store timestamps as decimal.Decimal objects
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]