Author martin.panter
Recipients Alexander.Belopolsky, Anders.Hovmöller, Arfrever, SilentGhost, aymeric.augustin, barry, belopolsky, berker.peksag, cvrebert, davydov, deronnax, eric.araujo, flying sheep, jcea, jstasiak, jwilk, karlcow, kirpit, martin.panter, mcepl, mihaic, nagle, pbryan, perey, piotr.dobrogost, r.david.murray, roysmith, vstinner
Date 2016-02-18.11:26:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455794773.08.0.369735977826.issue15873@psf.upfronthosting.co.za>
In-reply-to
Content
Did you see my class attributes suggestion a couple messages back? That might solve your dispatch problem:

def _parse_isodatetime(cls, string):
    match = cls._iso_regex.match(...)

class time:
    _iso_regex = re.compile(...)

# or

time._iso_regex = re.compile(...)
date._iso_regex = ...

For the C module, start looking at /Modules/datetimemodule.c. Maybe if you can think of a similar function implemented in C to copy off. It looks like strptime() defers to a Python-only implementation; maybe that is another option.
History
Date User Action Args
2016-02-18 11:26:13martin.pantersetrecipients: + martin.panter, barry, jcea, roysmith, belopolsky, nagle, vstinner, jwilk, mcepl, eric.araujo, Arfrever, r.david.murray, davydov, cvrebert, karlcow, SilentGhost, Alexander.Belopolsky, perey, flying sheep, mihaic, aymeric.augustin, berker.peksag, piotr.dobrogost, kirpit, Anders.Hovmöller, jstasiak, deronnax, pbryan
2016-02-18 11:26:13martin.pantersetmessageid: <1455794773.08.0.369735977826.issue15873@psf.upfronthosting.co.za>
2016-02-18 11:26:13martin.panterlinkissue15873 messages
2016-02-18 11:26:12martin.pantercreate