MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / __setitem__

Method __setitem__

PySimpleGUI/PySimpleGUI.py:22892–22904  ·  view source on GitHub ↗

Enables setting a setting by using [ ] notation like a dictionary. Your code will have this kind of design pattern: settings = sg.UserSettings() settings[item] = value :param item: The key for the setting to change. Needs to be a hashable type. Basically an

(self, item, value)

Source from the content-addressed store, hash-verified

22890 return self.dict
22891
22892 def __setitem__(self, item, value):
22893 """
22894 Enables setting a setting by using [ ] notation like a dictionary.
22895 Your code will have this kind of design pattern:
22896 settings = sg.UserSettings()
22897 settings[item] = value
22898
22899 :param item: The key for the setting to change. Needs to be a hashable type. Basically anything but a list
22900 :type item: Any
22901 :param value: The value to set the setting to
22902 :type value: Any
22903 """
22904 return self.set(item, value)
22905
22906 def __getitem__(self, item):
22907 """

Callers

nothing calls this directly

Calls 1

setMethod · 0.95

Tested by

no test coverage detected