Author deronnax
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.08:52:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455785552.08.0.366404585653.issue15873@psf.upfronthosting.co.za>
In-reply-to
Content
crap, here is the attachment.
Yeah, but I really would like to use regex in the C version (unless you strongly disadvise), so we will have the same logic and the same problem. And I never made a patch for the C interpreter itself, so the C equivalent is not close to be here soon. (btw if you have a starting point to recommend)

I definitely do not like this fix, it destroys the elegance and the simplicity of the "single-dispatch" solution. And it introduce a lot of noisy code for a very rare case, people subclassing datetime.* classes.

Maybe making the regex dictionary having string keys instead of class and passing the correct string from the calling function, like:

    def fromisoformat(string):
        _parse_isodatetime('time', string)

or maybe functools.singledispatch handle this case ?
History
Date User Action Args
2016-02-18 08:52:32deronnaxsetrecipients: + deronnax, 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, martin.panter, piotr.dobrogost, kirpit, Anders.Hovmöller, jstasiak, pbryan
2016-02-18 08:52:32deronnaxsetmessageid: <1455785552.08.0.366404585653.issue15873@psf.upfronthosting.co.za>
2016-02-18 08:52:32deronnaxlinkissue15873 messages
2016-02-18 08:52:31deronnaxcreate