Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69144
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!weretis.net!feeder4.news.weretis.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <prvs=1556b97b2=jeanmichel@sequans.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | UNSURE 0.207 |
| X-Spam-Level | ** |
| X-Spam-Evidence | '*H*': 0.59; '*S*': 0.00; 'way:': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'clock.': 0.16; 'computes': 0.16; 'pythonista,': 0.16; 'str()': 0.16; 'sunset': 0.16; 'bit': 0.19; 'value.': 0.19; 'saying': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; "i'm": 0.30; 'code': 0.31; 'supposed': 0.32; '-----': 0.33; 'ago': 0.33; '"the': 0.34; 'subject: (': 0.35; 'like,': 0.36; 'module.': 0.36; 'set.': 0.36; 'useful': 0.36; 'example,': 0.37; 'wrong': 0.37; 'being': 0.38; 'represent': 0.38; 'thank': 0.38; 'previous': 0.38; 'that,': 0.38; 'little': 0.38; 'how': 0.40; 'you.': 0.62; 'information': 0.63; 'term': 0.63; 'received:194': 0.64; 'hours': 0.66; 'notice:': 0.67; 'anything.': 0.68; 'feeling': 0.68; 'periodically': 0.68; 'person,': 0.68; 'roles': 0.68; 'default': 0.69; 'privileged.': 0.69; 'disclose': 0.74; 'day': 0.76; 'beside': 0.84; 'medium.': 0.91; 'imagine': 0.93 |
| X-IronPort-AV | E=Sophos;i="4.97,734,1389740400"; d="scan'208";a="2620200" |
| X-Virus-Scanned | amavisd-new at zimbra.sequans.com |
| Date | Wed, 26 Mar 2014 10:53:16 +0100 (CET) |
| From | Jean-Michel Pichavant <jeanmichel@sequans.com> |
| To | Roy Smith <roy@panix.com> |
| In-Reply-To | <roy-142548.20582725032014@news.panix.com> |
| Subject | Re: YADTR (Yet Another DateTime Rant) |
| MIME-Version | 1.0 |
| X-Mailer | Zimbra 7.2.4_GA_2900 (ZimbraWebClient - GC33 (Win)/7.2.4_GA_2900) |
| Content-Type | text/plain; charset="utf-8" |
| Content-Transfer-Encoding | base64 |
| X-Mailman-Approved-At | Wed, 26 Mar 2014 22:22:47 +0100 |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.8587.1395868967.18130.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1395868967 news.xs4all.nl 2870 [2001:888:2000:d::a6]:58909 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:69144 |
Show key headers only | View raw
----- Original Message ----- > One of my roles on this newsgroup is to periodically whine about > stupidities in the Python datetime module. This is one of those > times. > > I have some code which computes how long ago the sun set. Being a > nice > pythonista, I'm using a timedelta to represent this value. It would > be > difficult to imagine a less useful default way to print a timedelta: > > previous sunset: -1 day, 22:25:26.295993 > > The idea of str() is that it's supposed to return a human-friendly > representation of a value. Humans do not say things like, "The sun > set > 1 day ago plus 22 hours and 25 minutes". I can think of a less useful default way: previous sunset: 1 sunset ago This is how humans have been saying things for thousands of years before inventing the clock. Beside that, I think datetime has all the formatters required to do pretty much anything. Note : I don't see what's wrong in your example, however I have the feeling the term "stupiditie" is a little bit strong ;) JM -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: YADTR (Yet Another DateTime Rant) Jean-Michel Pichavant <jeanmichel@sequans.com> - 2014-03-26 10:53 +0100 Re: YADTR (Yet Another DateTime Rant) Johannes Bauer <dfnsonfsduifb@gmx.de> - 2014-03-27 11:09 +0100
csiph-web