Is is safe to use a function accepts kwargs keyword arguments that are not identifiers?
问题 In Python, is it safe to give keyword arguments that are not Python identifiers to a function? Here is an example: >>> '{x-y}'.format(**{'x-y': 3}) # The keyword argument is *not* a valid Python identifier '3' >>> '{x-y}'.format(x-y=3) File "<ipython-input-12-722afdf7cfa3>", line 1 SyntaxError: keyword can't be an expression I am asking this because it is more convenient for me to format with names that contain a dash (because the values correspond to command-line argument with dashes in