Comment #14 on issue 2307 by smi...@gmail.com: Duplicate methods: as_coeff_mul and as_coeff_Mul
http://code.google.com/p/sympy/issues/detail?id=2307

The test was just testing the ability to efficiently get the coefficient. If you have to do something with the rest of the expression, then using Mul(*b) will be slower than using _new_rawargs.

I thought I already looked at usage of the two before but I'll look again.

My three proposals are:
 1) drop as_coeff_Mul (current pull request)
2) drop all as_coeff_foo and make foo.make_args include an explicit number in slot0 3) drop as_coeff_add and mull and replace as_coeff_add with as_coeff_Add - breaking apart the terms yourself is easy, putting them together efficiently is a bit of a hastle.

If only the coefficient is ever really needed, add .mul0 and .add0 methods to return only the leading Number of the expression when treated like a Mul or Add.

--
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