[Python-ideas] strptime without second argument as an inverse to __str__
Akira Li
4kir4.1i at gmail.com
Fri Aug 8 17:17:36 CEST 2014
Please, don't put words in my mouth. To avoid Straw-man, quote me
directly in context. As I do with you in my messages.
Andrew Barnert
<abarnert at yahoo.com.dmarc.invalid> writes:
> Mixing up responses to an previous email you already responded to with
> the new one makes it harder to reply, but I'll try.
>
>
> On Thursday, August 7, 2014 10:43 PM, Akira Li <4kir4.1i at gmail.com> wrote:
>> > Andrew Barnert <abarnert at yahoo.com> writes:
>>
>>> On Aug 7, 2014, at 5:35, Akira Li <4kir4.1i at gmail.com> wrote:
>>>
>>>> Please, don't spread misinformation.
>>>>
>>>> Among the explicit rfc 3339 design goals are simplicity and human
>>>> readability.
>>>>
>>>> Just read http://tools.ietf.org/html/rfc3339 (for an rfc it is
>>>> relatively short and readable).
>> ...
>>> (And there's also a whole section of interpreting
>>> "legacy"/"deprecated" 2-digit years and how you should
>> handle them.)
>>>
>>> So, is the RFC "spreading misinformation" about itself?
>>
>> You are *obviously* wrong for the rfc 3339 Internet Date/Time Format
>> itself (used by __str__, isoformat -- relevant to the current topic).
>
>
> You accused me of "spreading misinformation" by saying that RFC 3339
> is more complicated than what Python's str generates. You also
> suggested that people often parse RFC 3339 with a simple strptime.
You said [1]:
"RFC 3339 is still more complicated than just reversing Python's str
or isoformat. IIRC (it's hard to check on my phone), it mandates that
parsers should accept 2-digit years (including 3-digit or
semicolon-and-two-digit years), lowercase T and Z, missing "-", and
other things that you shouldn't generate but some code might."
[1]
https://mail.python.org/pipermail/python-ideas/2014-August/028509.html
What I consider misinformation:
"it mandates that parsers should accept 2-digit years (including
3-digit or semicolon-and-two-digit years)" [Andrew Barnert]
'"missing "-"' [Andrew Barnert]
"and other things that you shouldn't generate but some code might."
[Andrew Barnert]
I've already described it quote by quote in [2] with all the gory
details including a careful usage of MUST, SHOULD words from [rfc
2119].
[2]
https://mail.python.org/pipermail/python-ideas/2014-August/028541.html
[rfc 2119] http://tools.ietf.org/html/rfc2119
> I pointed out that the RFC itself clearly defines something more
> complicated than what Python's str generates, and that it can't be
> fully parsed by a simple strptime, and then added a parenthetical
> remark about support for 2-year dates.
It *is* obvious that the rfc is more complex than the str method e.g.,
the rfc supports 'T', 'Z' (default str doesn't generate them as far as I
know).
But all specific details (except "lowercase T and Z") you provided in
the quote from [1] are wrong as described in [2]. What conclusions can
you draw about the whole statement after that?
> You cut out everything but the parenthetical remark, and replied to
> that as if it was the whole point of my message. And you even
> responded to nothing but the parenthetical 2-year comment in replies
> to completely separate sections of the message. I have no idea how to
> respond to that except to say: read it again.
I've read and reread [1]. I don't see what "other things" you are referring
to. To avoid ambiguity, could you use a direct quote and a link (as I've
demonstrated above)?
--
Akira
More information about the Python-ideas
mailing list