__div__ in Py 3?

17 views
Skip to first unread message

smichr

unread,
Sep 11, 2012, 2:56:36 AM9/11/12
to sy...@googlegroups.com
I've defined `__div__` for a Permutationa so that 1/Permutation gives `Permutation**-1` but Py 3 doesn't like this:


I've tried unsuccessfully to define truediv and rtruediv in the last two commits of https://github.com/sympy/sympy/pull/1508...does anyone have ideas how to make this work?

/c

Aaron Meurer

unread,
Sep 11, 2012, 12:18:35 PM9/11/12
to sy...@googlegroups.com
Usually __truediv__ = __div__ and __rtruediv__ = __rdiv__ does the trick. But I should note that I agree with Mario that defining division on permutations is a bad idea. 

Aaron Meurer
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sympy/-/_-WfbazitmYJ.
To post to this group, send email to sy...@googlegroups.com.
To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
Reply all
Reply to author
Forward
0 new messages