I guess there are two or three solutions:

1) don't use sets
2) put big, red warnings in the documentation of your functions
3) have an optional argument to your functions that switches between sets 
and safer (but slower) data structures. The documentation should be clear 
about the implications.

--Stefan.

On Tuesday, September 23, 2014 1:37:13 AM UTC-5, Clemens Heuberger wrote:
>
>
> Hi Simon, 
>
> Am 2014-09-20 um 18:47 schrieb Simon King: 
> > On 2014-09-20, Clemens Heuberger <[email protected] <javascript:>> 
> wrote: 
> >> Shall I enforce that the parent of all labels is the same (and warn the 
> user if 
> >> this is not the case?). Probably, I'd also allow strings as an 
> additional type 
> >> because this should not lead to conflicts. 
> > 
> > You could pre-process the input before passing it to the dict/set. 
> > Hence, if the user inputs an element of Frac(QQ[x]), then you can 
> > pre-process it by normalising it (i.e., make the denominator monic). 
>
> the problem is that the labels of a state could be any hashable Sage 
> object. 
> Thus preprocessing this single case of Frac(QQ[x]) would be quite ugly 
> IMHO and 
> would not address the underlying problem. 
>
> Best regards, 
>
> Clemens 
>
>

-- 
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to