Skip to content

Commit 8cbd4c4

Browse files
committed
work around our missing support for f-strings
1 parent 5777d06 commit 8cbd4c4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎graalpython/lib-python/3/collections/__init__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ def namedtuple(typename, field_names, *, rename=False, defaults=None, module=Non
391391

392392
# Create all the named tuple methods to be added to the class namespace
393393

394-
s = f'def __new__(_cls, {arg_list}): return _tuple_new(_cls, ({arg_list}))'
395-
namespace = {'_tuple_new': tuple_new, '__name__': f'namedtuple_{typename}'}
394+
s = 'def __new__(_cls, {0}): return _tuple_new(_cls, ({0}))'.format(arg_list)
395+
namespace = {'_tuple_new': tuple_new, '__name__': 'namedtuple_{}'.format(typename)}
396396
# Note: exec() has the side-effect of interning the field names
397397
exec(s, namespace)
398398
__new__ = namespace['__new__']

0 commit comments

Comments
 (0)