Hi Simon,

Am 2014-09-20 um 16:42 schrieb Simon King:
> On 2014-09-20, Clemens Heuberger <[email protected]> wrote:
>> So how do I work with dict and set in sage?
> 
> Carefully...
> That's to say, if your dictionary keys all live in the same ring (or
> other mathematical object) then it should be fine. The fact that in your
> example two equal elements of the *same* ring have different hashes is
> clearly a bug.
> However, if you simultaneously use elements of totally different rings
> as keys, then you ask for trouble.

well, I do not know what a potential user of the finite state machines module
will give me. On the other hand, the user does not necessarily know that the
labels are stored in a dict, so might run into trouble inadvertently (and
speaking from experience, this may lead to nasty debugging).

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.

> Note that Sage provides some specialised dictionaries where objects are
> always compared by identity, but I guess this won't be useful in your
> application.

Where can I find those?

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