75 |
75 |
76 @param namespace The namespace for the completer. |
76 @param namespace The namespace for the completer. |
77 @exception TypeError raised to indicate a wrong data structure of |
77 @exception TypeError raised to indicate a wrong data structure of |
78 the namespace object |
78 the namespace object |
79 """ |
79 """ |
80 if namespace and isinstance(namespace, dict): |
80 if namespace and not isinstance(namespace, dict): |
81 raise TypeError('namespace must be a dictionary') |
81 raise TypeError('namespace must be a dictionary') |
82 |
82 |
83 # Don't bind to namespace quite yet, but flag whether the user wants a |
83 # Don't bind to namespace quite yet, but flag whether the user wants a |
84 # specific namespace or to use __main__.__dict__. This will allow us |
84 # specific namespace or to use __main__.__dict__. This will allow us |
85 # to bind to __main__.__dict__ at completion time, not now. |
85 # to bind to __main__.__dict__ at completion time, not now. |