It seems that this is intended? The correct equivalent code is:
sage: gens = [[(2, 4)], [(1, 2)]]
sage: pg = PermutationGroup(gens=gens); pg
Permutation Group with generators [(2,4), (1,2)]
sage: pg._libgap_()
Group([ (2,4), (1,2) ])
sage: pg = PermutationGroup(gens=gens, domain={1, 2, 4}); pg
Permutation Group with generators [(2,4), (1,2)]
sage: pg._libgap_()
Group([ (2,3), (1,2) ])
Which is what's done at
https://github.com/sagemath/sage/blob/develop/src/sage/graphs/generic_graph.py#L24161-L24170.
But I'm not an expert in this part of the code.
Also, I didn't know we have a 25k lines file.
> --
> 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+...@googlegroups.com <mailto:
sage-
>
devel+un...@googlegroups.com>.
> To view this discussion visit
https://groups.google.com/d/msgid/sage-devel/
> fec1df7a-9db7-43b2-9af2-8dcdf6658585n%
40googlegroups.com <https://
>
groups.google.com/d/msgid/sage-devel/
> fec1df7a-9db7-43b2-9af2-8dcdf6658585n%
40googlegroups.com?
> utm_medium=email&utm_source=footer>.