Surprising behaviour of Set

44 views
Skip to first unread message

Martin R

unread,
Jun 25, 2017, 1:10:31 PM6/25/17
to sage-devel
I just noticed that Set([[], []]).cardinality() yields 2.  In earlier versions, a TypeError: unhashable type: 'list' was raised.

I think the behaviour was modified in https://trac.sagemath.org/ticket/22597.

Is this intended?  It seems to me that it would be safer if cardinality would raise an error...

Martin

Dima Pasechnik

unread,
Jun 25, 2017, 1:41:15 PM6/25/17
to sage-devel
a set theorist would be very happy :)

Vincent Delecroix

unread,
Jun 25, 2017, 1:47:36 PM6/25/17
to sage-...@googlegroups.com
I hope it was not intentional. It looks seriously broken. Did you
already opened a ticket?

Martin R

unread,
Jun 25, 2017, 3:05:05 PM6/25/17
to sage-devel
Reply all
Reply to author
Forward
0 new messages