DebugClients/Python/FlexCompleter.py

changeset 3043
71f5c524d427
parent 3032
927a2f8b3669
child 3591
2f2a4a76dd22
equal deleted inserted replaced
3042:c9c3c0982145 3043:71f5c524d427
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 isinstance(namespace, dict): 129 if namespace and not 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