<p dir="ltr"><br>
On 8 Aug 2014 03:27, "Alexander Belopolsky" <<a href="mailto:alexander.belopolsky@gmail.com">alexander.belopolsky@gmail.com</a>> wrote:<br>
><br>
><br>
> On Thu, Aug 7, 2014 at 4:17 AM, Wolfgang Maier <<a href="mailto:wolfgang.maier@biologie.uni-freiburg.de">wolfgang.maier@biologie.uni-freiburg.de</a>> wrote:<br>
>>><br>
>>><br>
>>> Since parsing will be done in C, it's cost can be made negligible. In<br>
>>> implementations other than CPython, YMMV.<br>
>>><br>
>><br>
>> Why would parsing occur in C ? The datetime module is implemented in pure Python.<br>
><br>
><br>
> No. In CPython, datetime module is implemented in C.<br>
><br>
> <a href="http://hg.python.org/cpython/file/default/Modules/_datetimemodule.c">http://hg.python.org/cpython/file/default/Modules/_datetimemodule.c</a></p>
<p dir="ltr">Don't we have both these days? (C accelerator with pure Python fallback)</p>
<p dir="ltr">Anyway, I'm +1 for Wolfgang's trio of "fromstr" alternative constructors, but the suggested variation that allows both " " and "T" as the separator, rather than accepting a parameter. Anyone wanting more flexibility can use strptime, or else switch to something like dateutil.</p>
<p dir="ltr">Cheers,<br>
Nick.<br></p>
<p dir="ltr">><br>
><br>
><br>
> _______________________________________________<br>
> Python-ideas mailing list<br>
> <a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
> Code of Conduct: <a href="http://python.org/psf/codeofconduct/">http://python.org/psf/codeofconduct/</a><br>
</p>