From 040fd4eac363dbb9e82f22f202a46964cedd0509 Mon Sep 17 00:00:00 2001 From: Thanassis Tsiodras Date: Sun, 19 May 2019 09:08:28 +0000 Subject: [PATCH] I like Maxime's use of .format here. --- dmt/A_mappers/learn_CHOICE_enums.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmt/A_mappers/learn_CHOICE_enums.py b/dmt/A_mappers/learn_CHOICE_enums.py index 5db1b92..44396b2 100644 --- a/dmt/A_mappers/learn_CHOICE_enums.py +++ b/dmt/A_mappers/learn_CHOICE_enums.py @@ -31,7 +31,7 @@ enums_dump = "\n ".join( ) enums_dump += "\n ".join( - 'printf("%s = %d\\n");' % (name.strip(), val.replace('LL','')) + 'printf("{} = {}\\n");'.format(name.strip(), val.replace('LL', '')) for name, val in enums ) uniq = os.getpid() -- GitLab