3 ms·
.format(locals()) is a hack; locals() isn't supported on some python implementations.
by baq 11y ago
.format(locals()) is a hack; locals() isn't supported on some python implementations.
- inclemnet 11y agoThe documentation at https://docs.python.org/3/library/functions.html#locals https://docs.python.org/3/library/functions.html#locals doesn't indicate that locals is not part of the language - where is it documented that using it is a hack and that python implementations need not support it?
- wyldfire 11y agoIt is on PyPy and CPython. Which ones don't? And when they don't support it, how do they behave? Return an empty dict or give an error?