On Wed, Mar 14, 2012 at 06:42:47AM -0700, Mark Shimozono wrote:
What is the official procedure for changing the name of a method?
I have to fix a common error in two functions (in sage/combinat/
root_system/root_lattice_realizations.py)
which are element methods of root-lattice-realizations:
to_positive_chamber and reduced_word.
I want to call them to_dominant_chamber and weyl_direction.
I'm open to even better names if someone has a suggestion.
My current solution is to write two new functions (really one function
and the second calls the first)
and change the old ones to call the new ones. There were only a few
uses of the old functions in the code (all occurring in doctests) and
I changed the ones I found.
Is there an easy way to check all the source code for a certain method
call?
sage: search_src?
or in a terminal:
cd SAGE_ROOT/devel/sage-combinat/sage
grep -r to_positive_chamber .
If you are using zsh you can use instead:
grep to_positive_chamber **/*.py
Beside, you should use
sage: sage.misc.misc.deprecated_function_alias?
to temporary let the method be accessible through its former name.
For a discussion on the topic, see
http://trac.sagemath.org/sage_trac/ticket/8546
Cheers,
Nicolas
--
Nicolas M. Thiéry Isil nthi...@users.sf.net
http://Nicolas.Thiery.name/
--
You received this message because you are subscribed to the Google Groups
sage-combinat-devel group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sage-combinat-devel?hl=en.