repr() with keywords is called a method, no? Like isoformat()<div><br></div><div>Victor<br><br>Le lundi 21 décembre 2015, Guido van Rossum <<a href="mailto:gvanrossum@gmail.com">gvanrossum@gmail.com</a>> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I still think the repr change to use keywords has a good chance for 3.6.</p>
<p dir="ltr">--Guido (mobile)</p>
<div class="gmail_quote">On Dec 21, 2015 2:09 PM, "Chris Barker" <<a href="javascript:_e(%7B%7D,'cvml','chris.barker@noaa.gov');" target="_blank">chris.barker@noaa.gov</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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="javascript:_e(%7B%7D,'cvml','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><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R <a href="tel:%28206%29%20526-6959" value="+12065266959" target="_blank">(206) 526-6959</a> voice<br>7600 Sand Point Way NE <a href="tel:%28206%29%20526-6329" value="+12065266329" target="_blank">(206) 526-6329</a> fax<br>Seattle, WA 98115 <a href="tel:%28206%29%20526-6317" value="+12065266317" target="_blank">(206) 526-6317</a> main reception<br><br><a href="javascript:_e(%7B%7D,'cvml','Chris.Barker@noaa.gov');" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>
<br>_______________________________________________<br>
Python-Dev mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','Python-Dev@python.org');" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
<br></blockquote></div>
</blockquote></div>