[Python-Dev] iso8601 parsing

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Oct 25 19:22:43 EDT 2017


On Wed, Oct 25, 2017 at 5:30 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> Maybe I'm just being slow today, but I don't see how you can write
> "generic code" to convert text to int/float/complex/Fraction, but not
> times. The only difference is that instead of calling the type directly,
> you call the appropriate classmethod.
>
> What am I missing?

Nothing. The only annoyance is that the data processing code typically
needs to know the type anyway, so the classmethod is one more variable
to keep track of.


More information about the Python-Dev mailing list