On Tue, 31 Jan 2012 21:11:37 +1000 Nick Coghlan <ncogh...@gmail.com> wrote: > > Having a low-level module like os needing to know about higher-level > types like decimal.Decimal and datetime.datetime (or even timedelta) > should be setting off all kinds of warning bells.
Decimal is ideally low-level (it's a number), it's just that it has a complicated high-level implementation :) But we can't use Decimal by default, for the obvious reason (performance impact that threatens to contaminate other parts of the code through operator application). > Of all the > possibilties that offer decent arithmetic support, timedelta is > probably the one currently most suited to being pushed down to the os > level, although decimal.Decimal is also a contender if backed up by > Stefan's C implementation. I'm -1 on using timedelta. This is a purity proposition that will make no sense to the average user. By the way, datetimes are relative too, by the same reasoning. Regards Antoine. _______________________________________________ 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