Showing content from http://mail.python.org/pipermail/python-dev/attachments/20130815/f534320e/attachment.html below:
<div dir="ltr">The PEP and code look generally good to me.<div><br></div><div>I think the API for median and its variants deserves some wider discussion: the reference implementation has a callable 'median', and variant callables 'median.low', 'median.high', 'median.grouped'. Â The pattern of attaching the variant callables as attributes on the main callable is unusual, and isn't something I've seen elsewhere in the standard library. Â I'd like to see some explanation in the PEP for why it's done this way. Â (There was already some discussion of this on the issue, but that was more centered around the implementation than the API.)</div>
<div><br></div><div>I'd propose two alternatives for this: Â either have separate functions 'median', 'median_low', 'median_high', etc., or have a single function 'median' with a "method" argument that takes a string specifying computation using a particular method. Â I don't see a really good reason to deviate from standard patterns here, and fear that users would find the current API surprising.</div>
<div><br></div><div>Mark</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 15, 2013 at 2:25 AM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I have raised a tracker item and PEP for adding a statistics module to the standard library:<br>
<br>
<a href="http://bugs.python.org/issue18606" target="_blank">http://bugs.python.org/<u></u>issue18606</a><br>
<br>
<a href="http://www.python.org/dev/peps/pep-0450/" target="_blank">http://www.python.org/dev/<u></u>peps/pep-0450/</a><br>
<br>
There has been considerable discussion on python-ideas, which is now reflected by the PEP. I've signed the Contributor Agreement, and submitted a patch containing updated code and tests. The tests aren't yet integrated with the test runner but are runnable manually.<br>
<br>
Can I request that people please look at this issue, with an aim to ruling on the PEP and (hopefully) adding the module to 3.4 before feature freeze? If it is accepted, I am willing to be primary maintainer for this module in the future.<br>
<br>
<br>
Thanks,<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
Steven<br>
______________________________<u></u>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/dickinsm%40gmail.com" target="_blank">http://mail.python.org/<u></u>mailman/options/python-dev/<u></u>dickinsm%40gmail.com</a><br>
</font></span></blockquote></div><br></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