[issue6641] strptime doesn't support %z format ?

2009-08-04 Thread David House

David House  added the comment:

>From the documentation from time.strptime() (which acts the same as
datetime.strptime()):

"Only the directives specified in the documentation [of time.strftime()]
are supported. Because strftime() is implemented per platform it can
sometimes offer more directives than those listed. But strptime() is
independent of any platform and thus does not necessarily support all
directives available that are not documented as supported."

So I think invalid.

--
nosy: +dmhouse

___
Python tracker 
<http://bugs.python.org/issue6641>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6641] strptime doesn't support %z format ?

2009-08-20 Thread David House

David House  added the comment:

Yes and no.

Firstly, %z isn't listed as deprecated in the documentation of the time
module's strftime -- although %Z is (note differing case).

Secondly, I still think the bug is invalid, because the documentation of
datetime.datetime.strptime says it behaves like time.strptime, whose
documentation says "only the directives specified in the documentation
[of strftime()] are supported". Since we're in the time module, that
reference to strftime() means time.strftime(), which doesn't list %z as
a directive.

Finally, there *is* a confusing docs issue, however: the "strftime()
behaviour" section in the datetime module documentation lists %z as a
valid directive, whereas it's not listed in time.strftime. Although
these functions have in theory nothing to do with one another, you would
in practice expect them to support the same directives.

Since in fact the footnote in the documentation of time.strftime() says
%z isn't supported by all ANSI C platforms (despite apparently being
required by the standard), I suggest that %z be removed from the list of
allowed modifiers in the "strftime() behaviour" section in the datetime
module documentation.

--

___
Python tracker 
<http://bugs.python.org/issue6641>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com