HN2new | past | comments | ask | show | jobs | submitlogin

.format(locals()) is a hack; locals() isn't supported on some python implementations.


The documentation at 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?


It 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?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: