MCPcopy Create free account
hub / github.com/bpython/bpython / on

Method on

bpython/curtsiesfrontend/manual_readline.py:117–133  ·  view source on GitHub ↗
(self, key=None, config=None)

Source from the content-addressed store, hash-verified

115 )
116
117 def on(self, key=None, config=None):
118 if not ((key is None) ^ (config is None)):
119 raise ValueError("Must use exactly one of key, config")
120 if key is not None:
121
122 def add_to_keybinds(func):
123 self.add(key, func)
124 return func
125
126 return add_to_keybinds
127 else:
128
129 def add_to_config(func):
130 self.add_config_attr(config, func)
131 return func
132
133 return add_to_config
134
135
136class ConfiguredEdits(AbstractEdits):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected