[Numpy-discussion] Ransom Proposals
wbaxter at gmail.com
Sun Mar 26 18:15:03 CST 2006
On 3/26/06, Fernando Perez <Fernando.Perez at colorado.edu> wrote:
> > Or, you can use the reshape method instead of function. I believe
> > numpy advocates use of methods instead of functions. What you observe
> > is just another reason for that. Since functions like reshape remain
> > in numpy primarily for backwards compatibility, I would be against any
> > change in semantics.
> Mmh. I bet many people will continue to use the functional interface for
> long time.
And maybe they'd be right to want a functional interface, too:
The author argues that in general, you should make as few functions as
possible be members of a class, always preferring non-member functions
wherever possible. It's about C++, but the principle should apply to
Python as well. It does make a certain kind of sense, although the article
seems to completely ignore polymorphism, which seems like it would be
another good reason to have functions be members, at least in C++.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion