#19562 is probably the best fix, but really that makes FiniteEnumeratedSet
not really any different than our (finite) Sequence class. I'm thinking we
need some sort of unification long-term.
> Also, instead of Subsets(L), I would also use subsets(L) (or powerset(L))
> > as you don't need the se
> Travis wrote:
> Also, instead of Subsets(L), I would also use subsets(L) (or powerset(L))
> as you don't need the set of all subsets to be a parent.
I see now that those functions don't support an argument for which size
subsets you need (which is critical in my application).
Best,
Johan
--
Hi everyone,
OK, we can bicker about the semantic difference of the words "bug" vs
"intentional but bad design" all day, but in the end we agree it's not
great for the user. It seems the ever-vigilant Vincent discovered the
problem already a year ago and proposed a sensible fix for the problem
in
https://trac.sagemath.org/ticket/19562
--
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 sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email t
On Wednesday, November 2, 2016 at 7:59:42 PM UTC-5, Luca De Feo wrote:
>
> > It is not a bug, but a by product of wanted (with documentation) of the
> > UniqueRepresentation and the coercion system in Sage. More below.
>
> This is a bug.
>
> The fact that it is a consequence of wanted and docu
On Wed, 2 Nov 2016, Johan S. H. Rosenkilde wrote:
for S in Subsets(GF(13).list(), 5):
if sum(S) == 1:
print "Monkey"
This code works as expected and prints monkeys galore when evaluating it
in a Sage shell. Now restart Sage and call the following line before
calling the above snippet:
> It is not a bug, but a by product of wanted (with documentation) of the
> UniqueRepresentation and the coercion system in Sage. More below.
This is a bug.
The fact that it is a consequence of wanted and documented behaviour
just shows that the wanted behaviour was badly designed (regardless of
Hey Johan,
> From my point of view, this can only be considered a bug: extremely
> surprising behaviour leading to subtle problems in user code (my code).
> Possibly, the bug is higher up than FiniteEnumeratedSets, though.
>
It is not a bug, but a by product of wanted (with documentation) of
On Wednesday, November 2, 2016 at 2:02:18 PM UTC-7, Johan S. H. Rosenkilde
wrote:
>
> Hi Travis,
>
> From my point of view, this can only be considered a bug: extremely
> surprising behaviour leading to subtle problems in user code (my code).
> Possibly, the bug is higher up than FiniteEnumer
Hi Travis,
>From my point of view, this can only be considered a bug: extremely
surprising behaviour leading to subtle problems in user code (my code).
Possibly, the bug is higher up than FiniteEnumeratedSets, though.
I'll explain: This came about when using Subsets. Basically, I'm doing
somethin
Hey Johan,
The problem is that we want finite enumerated sets to be hashable,
picklable, and unique as they get used as keys for CombinatorialFreeModule,
among other things, and it is implemented using UniqueRepresentation. The
problem is that 1 = 1 with the same hash value whether in ZZ or G
11 matches
Mail list logo