As asked by Martin, I tried to list *all* objections and alternatives. > * A: (numerator, denominator) > > * value = numerator / denominator > * resolution = 1 / denominator > * denominator > 0 > (...) > Tuple of integers have been rejected because they don't support > arithmetic operations.
Oh, after writing the 3rd version of this PEP, I realized that fractions.Fraction is very close to this format except that it can be coerced to float and arithmetic on Fraction and float is allowed (return float). My implementation of the PEP implements something like Fraction in C, but something more specific to timestamps (e.g. without arithmetic). I don't know yet if Fraction is better or worse than Decimal. I see at least one drawback, str(Fraction): 5576475333606653/4194304 is less readable than 1329535325.43341. > * Ruby (1.9.3), the `Time class <http://ruby-doc.org/core-1.9.3/Time.html>`_ > supports picosecond (10\ :sup:`-12`) We must do better than Ruby: support arbritrary precision! :-D Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com