<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Dec 20, 2015 at 2:28 PM, Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Would there be value in changing the repr to use keyword arguments?<br>
</blockquote><div><br></div><div>this thread got long, but it sounds like that won't be worth the backwards compatibility...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Worse, help(datetime.timedelta) in 3.6 doesn't document the<br>
constructor at all. There's no mention of __init__ at all, __new__ has<br>
this useless information:<br></blockquote><div><br></div><div>but this seems to have gotten lost in the shuffle.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
and aside from there being three data descriptors, there's nothing to<br>
suggest that you construct these things with timedelta(days, seconds,<br>
microseconds). Definitely no indication that you can use other keyword<br>
args.<br>
<br>
Is this something worth fixing, or is it acceptable to drive people to<br>
fuller documentation than help()?<br></blockquote><div><br></div><div>Absolutlye worht fixing! maybe it' sjsut my weird workflow, but I find it very, very useful to use iPython's ? :</div><div><br></div><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"></blockquote></div><font face="monospace, monospace">In [10]: datetime.timedelta?<br>Docstring: Difference between two datetime values.File: ~/miniconda2/lib/python2.7/lib-dynload/datetime.so<br>Type: type<br></font> </div><div class="gmail_quote">and there are a LOT of next-to worthless docstrings in the stdlib -- it would be nice to clean them all up.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Is there any reason not to, other than someone having to do the work?</div><div class="gmail_quote"><br></div><div class="gmail_quote">-Chris</div><div class="gmail_quote"><br></div><br clear="all"><div><br></div>-- <br><div 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></div>