This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, brian.curtin, daniel.urban, lemburg, r.david.murray
Date 2010-06-07.17:17:05
SpamBayes Score 0.00734692
Marked as misclassified No
Message-id <>
For the datetime module there are also a few more subtle issues that would make it difficult to make a hybrid C/Python implementation.  The problem is that unlike the time module where most of the functionality is implemented in module level functions, datetime functionality is entirely in class methods.

One may suggest to use inheritance and derive datetime classes from those implemented in _datetime.c, but this will not work because for example datetime + timedelta will return a _datetime class unless __add__ is overridden in Python.  There is another even less obvious issue with inheriting from datetime classes: see issue #5516.

Therefore, it looks like there are only two choices:

1. Replicate all functionality in both _datetime.c and and thus double the cost of implementing new features in CPython. (OK, maybe not double because Python development is easier than C, but increase instead of decrease.)

2. Incur a performance penalty in every method because every C call wil have to be wrapped in Python.

Another -1 from me.
Date User Action Args
2010-06-07 17:17:09belopolskysetrecipients: + belopolsky, lemburg, r.david.murray, brian.curtin, daniel.urban
2010-06-07 17:17:08belopolskysetmessageid: <>
2010-06-07 17:17:06belopolskylinkissue7989 messages
2010-06-07 17:17:05belopolskycreate