Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiline specials not defined in 0.11 branch #115

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

multiline specials not defined in 0.11 branch #115

fperez opened this issue May 11, 2010 · 2 comments
Milestone

Comments

@fperez
Copy link
Member

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'
@tomspur
Copy link
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]: 

@takluyver
Copy link
Member

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

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
Projects
None yet
Development

No branches or pull requests

3 participants