Message260449
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. |
|
Date |
User |
Action |
Args |
2016-02-18 11:26:13 | martin.panter | set | recipients:
+ 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:13 | martin.panter | set | messageid: <1455794773.08.0.369735977826.issue15873@psf.upfronthosting.co.za> |
2016-02-18 11:26:13 | martin.panter | link | issue15873 messages |
2016-02-18 11:26:12 | martin.panter | create | |
|