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 lemburg
Recipients amaury.forgeotdarc, belopolsky, brett.cannon, brian.curtin, daniel.urban, lemburg, pitrou, r.david.murray, techtonik, vstinner
Date 2010-06-17.14:59:00
SpamBayes Score 0.000491088
Marked as misclassified No
Message-id <>
In-reply-to <>
Alexander Belopolsky wrote:
> Alexander Belopolsky <> added the comment:
> On Thu, Jun 17, 2010 at 10:31 AM, Marc-Andre Lemburg <> wrote:
> ..
>> To avoid the wasted memory and import time, it's better to use:
>> try:
>>    from _cmodule import *
>> except ImportError:
>>    from _pymodule import *
> Hmm, I cannot find the relevant thread, but I thought this was rejected at some point.  Personally, I don't like this at all for the following reasons:
> 1. This introduces two _.. names instead of one.
> 2. This departs from established convention that C (or native) implementation for modulename is in _modulename, not _cmodulename.  Non-C implementations may still provide native _modulename, but would not want to call it _cmodulename.
> 3. Hiding python code in _pymodule makes it harder to find it.

Well, you wanted to have two implementation of the same thing in the
stdlib :-) I personally don't think that's a good idea. We've had
trouble in the past of keeping and cPickle.c in sync, it's
not going to be much different with those two datetime implementations.

In any case, we shouldn't make regular CPython use of datetime slower
and use more memory, just to make life easier for PyPy.

>> Why not import the two modules directly ?
>> import _cmodule as module
>> and
>> import _pymodule as module
> Because this requires having two modules in the first place.

Where's the problem ? Disk space ?
Date User Action Args
2010-06-17 14:59:02lemburgsetrecipients: + lemburg, brett.cannon, amaury.forgeotdarc, belopolsky, pitrou, vstinner, techtonik, r.david.murray, brian.curtin, daniel.urban
2010-06-17 14:59:00lemburglinkissue7989 messages
2010-06-17 14:59:00lemburgcreate