Comment #17 on issue 2807 by hazelnu...@gmail.com: Change .unit and .mag to proper methods and better names.
http://code.google.com/p/sympy/issues/detail?id=2807

In the interest of being easy to use and learn, either:

1)  .normalize(self, p=2) and .magnitude(self, p=2), or
2)  .normalize(self, p=2) and .norm(self, p=2)

are the best choices. They cover all the bases and are minimally complete. .versor(self, p=2) is too obscure, in my opinion.

I don't see a substantive benefit for offering two methods that do the same thing but have different names, i.e. offering magnitude(self) and norm(self, p=2), or offering .normalize(self) and .versor(self, p=2).

Having extra redundant methods adds unnecessary noise to the class, in my opinion. There are extra bits of documentation to consider, extra tests to maintain, extra methods in the object that a user who is learning how to use the class through IPython will have to play with to realize they are redundant, code that will look different but perform the same, etc... I am definitely not in favor of adding extra redundant methods for this case.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to