This is on windows
On python2:
In [1]: def a(): pass
In [2]: %pdef a
a()
On Python3:
In [5]: def a(): pass
In [6]: %pdef a
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
C:\python\ipydevel\VENV\åäö\error3.py in <module>()
----> 1 get_ipython().magic('pdef a')
C:\python\ipydevel\VENV\py32\lib\site-packages\ipython-0.13.dev-py3.2.egg\IPython\core\interactiveshell.py in magic(self, arg_s)
2140 magic_name, _, magic_arg_s = arg_s.partition(' ')
2141 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2142 return self.run_line_magic(magic_name, magic_arg_s)
2143
2144 #-------------------------------------------------------------------------
C:\python\ipydevel\VENV\py32\lib\site-packages\ipython-0.13.dev-py3.2.egg\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line)
2066 args.append(sys._getframe(stack_depth).f_locals)
2067 with self.builtin_trap:
-> 2068 result = fn(*args)
2069 return result
2070
C:\python\ipydevel\VENV\py32\lib\site-packages\ipython-0.13.dev-py3.2.egg\IPython\core\magics\namespace.py in pdef(self, parameter_s, namespaces)
C:\python\ipydevel\VENV\py32\lib\site-packages\ipython-0.13.dev-py3.2.egg\IPython\core\magic.py in <lambda>(f, *a, **k)
189 # but it's overkill for just that one bit of state.
190 def magic_deco(arg):
--> 191 call = lambda f, *a, **k: f(*a, **k)
192
193 if isinstance(arg, collections.Callable):
C:\python\ipydevel\VENV\py32\lib\site-packages\ipython-0.13.dev-py3.2.egg\IPython\core\magics\namespace.py in pdef(self, parameter_s, namespaces)
80 urllib.urlopen(url, data=None, proxies=None)
81 """
---> 82 self.shell._inspect('pdef',parameter_s, namespaces)
83
84 @line_magic
C:\python\ipydevel\VENV\py32\lib\site-packages\ipython-0.13.dev-py3.2.egg\IPython\core\interactiveshell.py in _inspect(self, meth, oname, namespaces, **kw)
1477 pmethod(info.obj, oname, formatter, info, **kw)
1478 else:
-> 1479 pmethod(info.obj, oname)
1480 else:
1481 print('Object `%s` not found.' % oname)
C:\python\ipydevel\VENV\py32\lib\site-packages\ipython-0.13.dev-py3.2.egg\IPython\core\oinspect.py in pdef(self, obj, oname)
356 header = self.__head('Class constructor information:\n')
357 obj = obj.__init__
--> 358 elif type(obj) is types.InstanceType:
359 obj = obj.__call__
360
AttributeError: 'module' object has no attribute 'InstanceType'
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4