[issue9528] Add pure Python implementation of time module to CPython

Alexander Belopolsky report at bugs.python.org
Tue Oct 5 19:52:26 CEST 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Thu, Aug 12, 2010 at 10:26 PM, STINNER Victor <report at bugs.python.org> wrote:
..
>> 1. Datetime.py time source (time.time()) represents time as
>> a floating point number which leads to system dependent behavior
>> and introduces floating point operations where they are not needed.
>
> Why not introducing a new function in time module? Other people may benefit from this.
>
I agree.  See issue 9079.

We can do that.  I'll experiment with this approach within issue 9527.

>> 4. No changes will be done to timemodule.c other than renaming
>
> What about time_strftime()? It is 170 lines long: will it be moved to _basictime.c? You have to keep
> the code filling the "struct tm" structure in (_)timemodule.c.

No, I don't want  time_strftime in _basictime.  I want
datetime_strftime to be independently implemented and freed of legacy
restrictions on the year range.   The _basictime module should include
a very simple wrapper around system strftime if we want to keep using
it in datetime.py, but it would be best to have complete pure python
implementation of both strftime and strptime.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9528>
_______________________________________


More information about the Python-bugs-list mailing list