Message336435
> Why use object.__setattr__(self, 'mu', mu) instead of
> self.mu = mu in the __init__ method?
The idea was the instances should be immutable and hashable, but this added unnecessary complexity, so I took this out prior to the check in.
> Should __pos__ return a copy rather than the instance itself?
Yes. I'll fix that straight-way.
^ The chice of using mu versus xbar was deliberate
I concur with that choice and also prefer to stick with mu and sigma:
1) It's too late to change it elsewhere in statistics and the random modules. 2) Having attribute names the same as function names in the same module is confusing. 3) I had already user tested this API in some Python courses. 4) The variable names match the various external sources I've linked to in the docs. 5) Python historically hasn't shied from greek letter names (math: pi tau gamma random: alpha, better, lambd, mu, sigma). |
|
Date |
User |
Action |
Args |
2019-02-24 05:56:41 | rhettinger | set | recipients:
+ rhettinger, tim.peters, mark.dickinson, steven.daprano, davin, selik, xtreak |
2019-02-24 05:56:41 | rhettinger | set | messageid: <1550987801.68.0.789821688116.issue36018@roundup.psfhosted.org> |
2019-02-24 05:56:41 | rhettinger | link | issue36018 messages |
2019-02-24 05:56:41 | rhettinger | create | |
|