TITLE: output debug information easily and quickly
POSSIBLE SOLUTION
Short form of keyword arguments where
foo(=a, =1+bar)
Is expanded at compile time to
foo(**{'a': a, '1+bar': 1+bar})
Then we can just create a normal debug function:
def debug_print(**vars):
for k, v in vars.items():
print(f'{k}={v}')
this is of course useful for many other things as Steven has pointed out.
/ Anders
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/