MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / __getitem__

Method __getitem__

PySimpleGUI/PySimpleGUI.py:22906–22917  ·  view source on GitHub ↗

Enables accessing a setting using [ ] notation like a dictionary. If the entry does not exist, then the default value will be returned. This default value is None unless user sets by calling UserSettings.set_default_value(default_value) :param item: The key for the

(self, item)

Source from the content-addressed store, hash-verified

22904 return self.set(item, value)
22905
22906 def __getitem__(self, item):
22907 """
22908 Enables accessing a setting using [ ] notation like a dictionary.
22909 If the entry does not exist, then the default value will be returned. This default
22910 value is None unless user sets by calling UserSettings.set_default_value(default_value)
22911
22912 :param item: The key for the setting to change. Needs to be a hashable type. Basically anything but a list
22913 :type item: Any
22914 :return: The setting value
22915 :rtype: Any
22916 """
22917 return self.get(item, self.default_value)
22918
22919 def __delitem__(self, item):
22920 """

Callers

nothing calls this directly

Calls 1

getMethod · 0.95

Tested by

no test coverage detected