[Numpy-discussion] Proposal for changing the names of inverse trigonometrical/hyperbolic functions

Gael Varoquaux gael.varoquaux at normalesup.org
Mon Nov 24 16:43:21 EST 2008


On Mon, Nov 24, 2008 at 09:00:48PM +0100, Jon Wright wrote:
> There is resistance. Please don't remove the old names. Also note that 
> your proposed change will alter people's code in subtle, but potentially 
> very "interesting" ways:

> >>> from math import *
> >>> from numpy import *
> >>> type(arcsin(1)) is type(asin(1))
> False
> >>> from numpy import arcsin as transformacion_del_arco_seno
> >>> arcsin == transformacion_del_arco_seno
> True

"from foo import *" is really bad. I used to think it wasn't that bad,
but I came to realize over the years that it did nothing more than cause
confusion (like the one above), and that the cost was very small.

Maybe it is just that I have lost contact with basic users...

> I have the feeling the only times I ever write to this list is to say 
> "please don't change the API". So, here I am again, "please don't change 
> the API".

I understand your point, and it is very valid. I am +0 on that ("+"
because I favor consistency, "0" because as you point out, this is bad).

Gaël



More information about the NumPy-Discussion mailing list