Steven D'Aprano added the comment:

On 06/08/13 03:08, Mark Dickinson wrote:
>
> I too find the use of a class that'll never be instantiated peculiar.

I'll accept "unusual", but not "peculiar". It's an obvious extension to classes 
being first-class objects. We use classes as objects very frequently, we call 
methods on classes directly (e.g. int.fromhex). This is just a trivial 
variation where I am using a class-as-object as a function.

But if this is really going to be a sticking point, I can avoid using a class. 
I'll make median a plain function. Will that be acceptable?

> As you say, there's no state to be stored.  So why not simply have separate 
> functions `median`, `median_low`, `median_high`, `median_grouped`, etc.?

Why have a pseudo-namespace median_* when we could have a real namespace 
median.* ?

I discussed my reasons for this here:
http://mail.python.org/pipermail/python-ideas/2013-August/022612.html

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18606>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to