[Python-Dev] datetime nanosecond support. list of proposals

Vincenzo Ampolo vincenzo.ampolo at gmail.com
Sat Jul 28 10:50:20 CEST 2012


Hi all again,

I've been quite busy these days and I collected all the suggestions
about the proposal. Here is a small summary:

Christian Heimes:
    two numbers:
        Julian Day Number (Rata Die) 32 bit signed integer
        nanoseconds in a day 64 bit signed or unsigned integer
    pro:
        fix 2038 bug
    cons:
        hard conversion to Gregorian calendar

Charles Cazabon:
    use tai64/tai64n/tai64na
    pro:
        well defined
        libraries available
    cons:
    	?

As ways to implement the idea there are these advices:

Nick Coghlan:
    define common API based on datetime
    maybe use TAI
    fork the pure Python version of datetime, then fork the C
implementation to make PyPI version faster, then make a PEP

Guido van Rossum:
    must do:
        clever backward compatibility
        use fewer bits as possible
    stdlib is not the right place for first implementation

Since I'm not a big expert of calendars and date representation I'm
going to study the Julian Calendar and the TAI representation.
As a first read from Wikipedia the TAI solution looks very promising.

For the ways to implement the idea I also believe that It's better to
have a pure python implementation (so It can be used on python 2.x and
distributed on PyPI) and then a Python 3.x C implementation and a PEP
submission.

I'm open to any other idea/advice. If there are other people that would
like to implement this with me, just write me a mail.

Thank you.

Best Regards,
-- 
Vincenzo Ampolo
http://vincenzo-ampolo.net
http://goshawknest.wordpress.com


More information about the Python-Dev mailing list