Hey Nathann,

On Thursday, December 17, 2015 at 8:33:48 PM UTC-6, Nathann Cohen wrote:
>
> > That would completely over-engineer things, be backwards incompatible, 
> and 
> > would make users hate us. This is why we have exceptions. 
>
> Stick to that "would make users hate us" thought and look at what we have: 
>
> - A method that "sometimes work, and sometimes does not", because it 
> does not apply to all instances of its class 
>

It is perfectly valid for a method to raise an error if the current 
instance does not meet certain criteria. I feel a double standard here with 
multiedges and loops...

>
> - Mathematically speaking, this method cannot even be *defined* on the 
> object to which it belongs (the order does not always exist) 
>

It has a perfectly valid and useful definition with a very mild assumption.

>
> - No documentation of whenever this function can be expected to work 
> (in particular no warning) 
>

I don't mind adding a *little* warning to the doc.

>
> - Unclear error message when it fails: 
>
>     sage: SetPartition([{'a','b','c'}]).to_permutation() 
>     ... 
>     TypeError: cannot concatenate 'str' and 'int' objects 
>

This will be fixed by the warning above. Although I would actually argue 
that this implementation cuts a few too many corners in this case.

>
> If what I propose is "over engineering", do you have anything better? 
>
> One or two warnings along with a little bit of coding to improve things 
without throwing fud all over something.

BTW, the only messages complaining about this I've seen is from you.

Best,
Travis

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to