DebugClients/Python/FlexCompleter.py

changeset 3032
927a2f8b3669
parent 2987
c99695c0f13a
child 3043
71f5c524d427
equal deleted inserted replaced
3031:ed2eaa573ca5 3032:927a2f8b3669
124 readline.set_completer(Completer(my_namespace).complete) 124 readline.set_completer(Completer(my_namespace).complete)
125 125
126 @param namespace namespace for the completer 126 @param namespace namespace for the completer
127 @exception TypeError raised to indicate a wrong namespace structure 127 @exception TypeError raised to indicate a wrong namespace structure
128 """ 128 """
129 if namespace and type(namespace) != type({}): 129 if namespace and isinstance(namespace, dict):
130 raise TypeError('namespace must be a dictionary') 130 raise TypeError('namespace must be a dictionary')
131 131
132 # Don't bind to namespace quite yet, but flag whether the user wants a 132 # Don't bind to namespace quite yet, but flag whether the user wants a
133 # specific namespace or to use __main__.__dict__. This will allow us 133 # specific namespace or to use __main__.__dict__. This will allow us
134 # to bind to __main__.__dict__ at completion time, not now. 134 # to bind to __main__.__dict__ at completion time, not now.

eric ide

mercurial