Showing content from http://mail.python.org/pipermail/python-dev/attachments/20190227/a6eb82f8/attachment.html below:
<div dir="ltr"><div dir="ltr">Did we ever hear back from the OP as to whether they were using py2 or 3?</div><div dir="ltr"><br></div><div dir="ltr">If they were unable to find timedelta division in py3 -- that's a pretty good case that we need something else.<br><div><br></div><div><br></div><div>The OP:</div><div>"""</div><div>On Wed, Feb 13, 2019 at 9:10 PM Richard Belleville via Python-Dev <<a href="mailto:python-dev@python.org">python-dev@python.org</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>In a recent code review, the following snippet was called out as reinventing the</div><div>wheel:</div><div><br></div><div>_MICROSECONDS_PER_SECOND = 1000000</div><div><br></div><div><br></div><div>def _timedelta_to_microseconds(delta):</div><div>Â return int(delta.total_seconds() * _MICROSECONDS_PER_SECOND)</div><div><br></div><div><br></div><div>The reviewer thought that there must already exist a standard library function</div><div>that fulfills this functionality. After we had both satisfied ourselves that we</div><div>hadn't simply missed something in the documentation, we decided that we had</div><div>better raise the issue with a wider audience.</div></div></div></blockquote><div>"""Â </div><div><br></div><div>-CHB</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R Â Â Â Â Â Â (206) 526-6959Â Â voice<br>7600 Sand Point Way NE Â Â (206) 526-6329Â Â fax<br>Seattle, WA Â 98115 Â Â Â Â (206) 526-6317Â Â main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div></div>
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