Skip to content

Commit 596aafc

Browse files
committed
Fixing problem after correcting isIdentifier.
1 parent ce80c16 commit 596aafc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎graalpython/lib-graalpython/python_cext.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,11 +882,13 @@ def PyStructSequence_New(typ):
882882

883883
namedtuple_type = None
884884
@may_raise
885-
def PyStructSequence_InitType2(type_name, type_doc, field_names, field_docs):
885+
def PyStructSequence_InitType2(tp_name, type_doc, field_names, field_docs):
886886
assert len(field_names) == len(field_docs)
887887
global namedtuple_type
888888
if not namedtuple_type:
889889
from collections import namedtuple as namedtuple_type
890+
last_dot_idx = tp_name.rfind(".")
891+
type_name = tp_name[last_dot_idx+1:] if last_dot_idx != -1 else tp_name
890892
new_type = namedtuple_type(type_name, field_names)
891893
new_type.__doc__ = type_doc
892894
for i in range(len(field_names)):

0 commit comments

Comments
 (0)