gh-96905: In IDLE code, stop redefining built-ins 'dict' and 'object' (#114227)

Prefix 'dict' with 'o', 'g', or 'l' for 'object', 'global', or 'local'.
Suffix 'object' with '_'.
This commit is contained in:
Terry Jan Reedy 2024-01-17 23:39:12 -05:00 committed by GitHub
parent 8cda72037b
commit 6f4b242a03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 45 additions and 42 deletions

View file

@ -106,8 +106,8 @@ class VariablesTreeItem(ObjectTreeItem):
value = self.object[key]
except KeyError:
continue
def setfunction(value, key=key, object=self.object):
object[key] = value
def setfunction(value, key=key, object_=self.object):
object_[key] = value
item = make_objecttreeitem(key + " =", value, setfunction)
sublist.append(item)
return sublist