On Wednesday, June 13, 2012 2:44:58 PM UTC+2, David Joyner wrote:
>
> On Wed, Jun 13, 2012 at 8:31 AM, Ronan Lamy  wrote: 
> > Le mercredi 13 juin 2012 à 02:06 -0700, Aleksandar Makelov a écrit : 
> >> Hi again, 
> >> 
>
> ... 
>
> > 
> >> - remove the checks from Perm, and make a *function* PermS (the name 
> >> is deliberately chosen to be as close as Perm) that performs the 
> >> checks and then constructs a permutation object using Perm (the name 
> >> comes from Permutation Safe). 
> > 
> > Urgh, no! The design is OK, though not terribly consistent with the rest 
> > of sympy where users need to directly call class constructors all the 
> > time, but the naming seems designed to maximise user confusion. Casual 
> > users shouldn't need to know about the concept of permutation 
> > "safeness", nor have to remember a cryptic abbreviation for it, and 
> > functions names (conventionally lowercase) shouldn't make them look like 
> > classes. 
>
>
> I'm a little confused. Is PermS a user function? I thought it was 
> internal. 
> If it is internal, and not a function for the casual user, then it 
> might be renamed _PermS, so it doesn't pop up in tab completion. 
>
>
>
>
Using Perm in Permutation is a bit ugly, but it is endorsed by Knuth
(quote which I found in 
http://www.xact.es/xPerm/index.html)<http://www.xact.es/xPerm/index.html>
''Following a suggestion of Vaughan Pratt, we adopt the convention that 
perm = permutation, perhaps thereby saving millions of syllables in future 
research.'' 

I  can accept that PermS be used to create safely permutations, along  with 
Perm which creates them without checking, although I would then use only 
PermS, since I care about the checks; it is a place less to check if I have 
a bug.

If I need speed I use _new_from_array_form, which is faster than the 
proposed Perm. I am strongly against  _PermS, which is not convenient to 
type.

-- 
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/-/GuuO26Bcu1MJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to