Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit d624b29

Browse files
committed
27911: Do not restric libgap.xxx to a predefined list
1 parent 716fb69 commit d624b29

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/sage/libs/gap/libgap.pyx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -678,16 +678,9 @@ class Gap(Parent):
678678
if name in dir(self.__class__):
679679
return getattr(self.__class__, name)
680680

681-
from sage.libs.gap.gap_functions import common_gap_functions
682-
from sage.libs.gap.gap_globals import common_gap_globals
683-
if name in common_gap_functions:
684-
initialize()
685-
g = make_GapElement_Function(self, gap_eval(name))
686-
assert g.is_function()
687-
elif name in common_gap_globals:
688-
initialize()
689-
g = make_any_gap_element(self, gap_eval(name))
690-
else:
681+
try:
682+
g = self.eval(name)
683+
except ValueError:
691684
raise AttributeError(f'No such attribute: {name}.')
692685

693686
self.__dict__[name] = g

0 commit comments

Comments
 (0)