Terry J. Reedy <tjre...@udel.edu> added the comment:
This is not a bug; the behavior is covered in the docs. I am surprised that this works in 2.7, as it has the same warning as 3.7: " locals() Update and return a dictionary representing the current local symbol table. Free variables are returned by locals() when it is called in function blocks, but not in class blocks. Note The contents of this dictionary should not be modified; changes may not affect the values of local and free variables used by the interpreter." ---------- nosy: +terry.reedy type: behavior -> enhancement _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36426> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com