Message194499
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 |
|
Date |
User |
Action |
Args |
2013-08-05 18:14:23 | steven.daprano | set | recipients:
+ steven.daprano, gregory.p.smith, ronaldoussoren, mark.dickinson, belopolsky, pitrou, agthorr, christian.heimes, stutzbach, tshepang, vajrasky |
2013-08-05 18:14:23 | steven.daprano | link | issue18606 messages |
2013-08-05 18:14:23 | steven.daprano | create | |
|