multiline specials not defined in 0.11 branch #115

Closed
fperez opened this Issue May 11, 2010 · 2 comments

Comments

Projects
None yet
3 participants
Owner

fperez commented May 11, 2010

See session:

Python 2.6.4 (r264:75706, Dec  7 2009, 18:43:55) 
Type "copyright", "credits" or "license" for more information.

IPython 0.11.alpha1.bzr.r1223 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: def f(x):
   ...:     r = 1
   ...:     r *= 2
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

/home/fperez/usr/lib/python2.6/site-packages/IPython/core/prefilter.pyc in prefilter_lines(self, lines, continue_prompt)
437                              for lnum, line in enumerate(llines) ])
438         else:
--> 439             out = self.prefilter_line(llines[0], continue_prompt)
440 
441         return out

/home/fperez/usr/lib/python2.6/site-packages/IPython/core/prefilter.pyc in prefilter_line(self, line, continue_prompt)
412             return normal_handler.handle(line_info)
413 
--> 414         prefiltered = self.prefilter_line_info(line_info)
415         # print "prefiltered line: %r" % prefiltered

416         return prefiltered

/home/fperez/usr/lib/python2.6/site-packages/IPython/core/prefilter.pyc in prefilter_line_info(self, line_info)
343         """
344         # print "prefilter_line_info: ", line_info

--> 345         handler = self.find_handler(line_info)
346         return handler.handle(line_info)
347 

/home/fperez/usr/lib/python2.6/site-packages/IPython/core/prefilter.pyc in find_handler(self, line_info)
350         for checker in self.checkers:
351             if checker.enabled:
--> 352                 handler = checker.check(line_info)
353                 if handler:
354                     return handler

/home/fperez/usr/lib/python2.6/site-packages/IPython/core/prefilter.pyc in check(self, line_info)
696 
697         # We have a likely magic method.  Make sure we should actually call it.

--> 698         if line_info.continue_prompt and not self.shell.multi_line_specials:
699             return None
700 

AttributeError: 'InteractiveShell' object has no attribute 'multi_line_specials'
Contributor

tomspur commented Jul 18, 2010

Hmm, I couldn't reproduce the crash in this session...

$ ./ipython.py 
/usr/lib/python2.6/site-packages/argparse.py:1576: DeprecationWarning: The 
"version" argument to ArgumentParser is deprecated. Please use 
"add_argument(..., action='version', version="N", ...)" instead
 """instead""", DeprecationWarning)
Python 2.6.4 (r264:75706, Jun  4 2010, 18:20:31) 
Type "copyright", "credits" or "license" for more information.

IPython 0.11.alpha1.git -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: def f(x):
   ...:     r = 1
   ...:     r *= 2
   ...:     

In [2]: 
Owner

takluyver commented Mar 22, 2011

Can't replicate, and looking at IPython/core/prefilter.py, the relevant code has been changed. Closing.

@takluyver takluyver closed this Mar 22, 2011

minrk pushed a commit to minrk/ipython that referenced this issue Jul 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment