Hi Christian,

On Tue, Jun 25, 2013 at 03:03:51PM +0200, Christian Stump wrote:
> I am sure some of you have been thinking about that before:
> 
> sage: a = Permutation([3,2,1])
> sage: b = Partition([3,2,1])
> sage: c = Composition([3,2,1])
> sage: a == b == c
> True
> sage: hash(a) == hash(b) == hash(c)
> True
> 
> Is this desired behaviour?

It's more like an accident in history. It's not incorrect per se, but
I agree it's not great in case one has a dictionary containing a mix
of objects. This "feature" will disappear by itself when we will
(finally!) fix Permutation/Partition/... to use the Cythonized class
ClonableList instead of CombinatorialObject: I just checked and
ClonableList._hash_ takes the parent into account.

Cheers,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-combinat-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-combinat-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to