From 6026e563b446a6ea5bb03f0e2de665188d84aef5 Mon Sep 17 00:00:00 2001 From: kevin lui Date: Mon, 13 Jun 2016 21:39:59 -0700 Subject: [PATCH 1/4] parse_label now returns index --- src/sage/modular/modform/constructor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/modular/modform/constructor.py b/src/sage/modular/modform/constructor.py index 1bb40fff92b..c6da0eb41d9 100644 --- a/src/sage/modular/modform/constructor.py +++ b/src/sage/modular/modform/constructor.py @@ -522,7 +522,7 @@ def parse_label(s): if G[2] != '[' or G[-1] != ']': raise ValueError("Invalid congruence subgroup label: %s" % G) gens = [int(g.strip()) for g in G[3:-1].split(',')] - return arithgroup.GammaH(N, gens) + return arithgroup.GammaH(N, gens), index else: raise ValueError("Invalid congruence subgroup label: %s" % G) return G, index From 80166b856e95e3c1373f5dfd32bd50d3955bd3c7 Mon Sep 17 00:00:00 2001 From: kevin lui Date: Tue, 14 Jun 2016 08:30:32 -0700 Subject: [PATCH 2/4] added docstring, removed blank line at end of file --- src/sage/modular/modform/constructor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sage/modular/modform/constructor.py b/src/sage/modular/modform/constructor.py index c6da0eb41d9..7a712f2bd7c 100644 --- a/src/sage/modular/modform/constructor.py +++ b/src/sage/modular/modform/constructor.py @@ -505,6 +505,10 @@ def parse_label(s): (Congruence Subgroup Gamma1(11), 0) sage: sage.modular.modform.constructor.parse_label('11wG1') (Congruence Subgroup Gamma1(11), 22) + + GammaH labels should also return the group and index (:trac:`20823`) + sage: sage.modular.modform.constructor.parse_label('389cGH[16]') + (Congruence Subgroup Gamma_H(389) with H generated by [16], 2) """ m = re.match(r'(\d+)([a-z]+)((?:G.*)?)$', s) if not m: @@ -526,5 +530,3 @@ def parse_label(s): else: raise ValueError("Invalid congruence subgroup label: %s" % G) return G, index - - From 79e11ab1c78ac41b568a9b6a5fcc278e29449e7e Mon Sep 17 00:00:00 2001 From: Kevin Lui Date: Tue, 14 Jun 2016 13:18:46 -0400 Subject: [PATCH 3/4] fixed docstring --- src/sage/modular/modform/constructor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/modular/modform/constructor.py b/src/sage/modular/modform/constructor.py index 7a712f2bd7c..f378ca8e83c 100644 --- a/src/sage/modular/modform/constructor.py +++ b/src/sage/modular/modform/constructor.py @@ -506,7 +506,7 @@ def parse_label(s): sage: sage.modular.modform.constructor.parse_label('11wG1') (Congruence Subgroup Gamma1(11), 22) - GammaH labels should also return the group and index (:trac:`20823`) + GammaH labels should also return the group and index (:trac:`20823`):: sage: sage.modular.modform.constructor.parse_label('389cGH[16]') (Congruence Subgroup Gamma_H(389) with H generated by [16], 2) """ From b00abe17e2eaf0d24768da4344917d94a8a78276 Mon Sep 17 00:00:00 2001 From: Kevin Lui Date: Tue, 14 Jun 2016 16:32:34 -0400 Subject: [PATCH 4/4] more docstring fixes --- src/sage/modular/modform/constructor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/modular/modform/constructor.py b/src/sage/modular/modform/constructor.py index f378ca8e83c..f1a092d3421 100644 --- a/src/sage/modular/modform/constructor.py +++ b/src/sage/modular/modform/constructor.py @@ -507,6 +507,7 @@ def parse_label(s): (Congruence Subgroup Gamma1(11), 22) GammaH labels should also return the group and index (:trac:`20823`):: + sage: sage.modular.modform.constructor.parse_label('389cGH[16]') (Congruence Subgroup Gamma_H(389) with H generated by [16], 2) """