mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
[3.11] gh-96905: In IDLE code, stop redefining built-ins 'dict' and 'object' (GH-114227) (#114229)
Prefix 'dict' with 'o', 'g', or 'l' for 'object', 'global', or 'local'.
Suffix 'object' with '_'.
(cherry picked from commit 6f4b242a03
)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
4ec2e2eeee
commit
f49a1ce6b2
8 changed files with 45 additions and 42 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue