A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-July/067308.html below:

[Python-Dev] User's complaints

[Python-Dev] User's complaintsskip at pobox.com skip at pobox.com
Wed Jul 12 13:13:47 CEST 2006
    >> Python 2.3:
    >> 
    >> >>> import time
    >> >>> time.strftime("%Y-%m-%d", (2005, 6, 4) + (0,)*6)
    >> '2005-06-04'

    Martin> Is there any specific reason you couldn't write

    Martin> "%d-%02d-%02d" % (2005, 6, 4)

    Martin> (i.e. not use strftime at all)?

Sure, but that was just me being lazy typing at the interactive prompt.
%Y-%m-%d is just about the only date format I can ever remember without
consulting the strftime(3) man page. ;-)  Suppose I had used

    >>> time.strftime("%b %d, %Y", (2005, 6, 4) + (1,)*6)
    'Jun 04, 2005'

instead (switching to the all-ones default that still works)?

    Martin> So this was changed in response to a bug report about a crash.

Yeah, but it broke common (at the time) usage.

Skip
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4