Show More
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.' | |||||
6 |
|
6 | |||
7 | This file contains all the classes and helper functions specific to IPython. |
|
7 | This file contains all the classes and helper functions specific to IPython. | |
8 |
|
8 | |||
9 |
$Id: iplib.py 21 |
|
9 | $Id: iplib.py 2135 2007-03-10 09:26:25Z fperez $ | |
10 | """ |
|
10 | """ | |
11 |
|
11 | |||
12 | #***************************************************************************** |
|
12 | #***************************************************************************** | |
@@ -487,8 +487,7 b' class InteractiveShell(object,Magic):' | |||||
487 | # Don't get carried away with trying to make the autocalling catch too |
|
487 | # Don't get carried away with trying to make the autocalling catch too | |
488 | # much: it's better to be conservative rather than to trigger hidden |
|
488 | # much: it's better to be conservative rather than to trigger hidden | |
489 | # evals() somewhere and end up causing side effects. |
|
489 | # evals() somewhere and end up causing side effects. | |
490 |
|
490 | self.line_split = re.compile(r'^(\s*[,;/]?\s*)' | ||
491 | self.line_split = re.compile(r'^([\s*,;/])' |
|
|||
492 | r'([\?\w\.]+\w*\s*)' |
|
491 | r'([\?\w\.]+\w*\s*)' | |
493 | r'(\(?.*$)') |
|
492 | r'(\(?.*$)') | |
494 |
|
493 | |||
@@ -2026,9 +2025,11 b' want to merge them back into the new files.""" % locals()' | |||||
2026 |
|
2025 | |||
2027 | lsplit = self.line_split.match(line) |
|
2026 | lsplit = self.line_split.match(line) | |
2028 | if lsplit is None: # no regexp match returns None |
|
2027 | if lsplit is None: # no regexp match returns None | |
|
2028 | #print "match failed for line '%s'" % line # dbg | |||
2029 | try: |
|
2029 | try: | |
2030 | iFun,theRest = line.split(None,1) |
|
2030 | iFun,theRest = line.split(None,1) | |
2031 | except ValueError: |
|
2031 | except ValueError: | |
|
2032 | #print "split failed for line '%s'" % line # dbg | |||
2032 | iFun,theRest = line,'' |
|
2033 | iFun,theRest = line,'' | |
2033 | pre = re.match('^(\s*)(.*)',line).groups()[0] |
|
2034 | pre = re.match('^(\s*)(.*)',line).groups()[0] | |
2034 | else: |
|
2035 | else: | |
@@ -2038,8 +2039,10 b' want to merge them back into the new files.""" % locals()' | |||||
2038 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun.strip(),theRest) # dbg |
|
2039 | #print 'pre <%s> iFun <%s> rest <%s>' % (pre,iFun.strip(),theRest) # dbg | |
2039 | return pre,iFun.strip(),theRest |
|
2040 | return pre,iFun.strip(),theRest | |
2040 |
|
2041 | |||
2041 |
|
2042 | # THIS VERSION IS BROKEN!!! It was intended to prevent spurious attribute | ||
2042 | def split_user_inputTMP(self,line): |
|
2043 | # accesses with a more stringent check of inputs, but it introduced other | |
|
2044 | # bugs. Disable it for now until I can properly fix it. | |||
|
2045 | def split_user_inputBROKEN(self,line): | |||
2043 | """Split user input into pre-char, function part and rest.""" |
|
2046 | """Split user input into pre-char, function part and rest.""" | |
2044 |
|
2047 | |||
2045 | lsplit = self.line_split.match(line) |
|
2048 | lsplit = self.line_split.match(line) |
@@ -1,3 +1,9 b'' | |||||
|
1 | 2007-03-10 Fernando Perez <Fernando.Perez@colorado.edu> | |||
|
2 | ||||
|
3 | * IPython/iplib.py (InteractiveShell.__init__): fix for Alex | |||
|
4 | Schmolck's recently reported tab-completion bug (my previous one | |||
|
5 | had a problem). Patch by Dan Milstein <danmil-AT-comcast.net>. | |||
|
6 | ||||
1 | 2007-03-09 Walter Doerwald <walter@livinglogic.de> |
|
7 | 2007-03-09 Walter Doerwald <walter@livinglogic.de> | |
2 |
|
8 | |||
3 | * IPython/Extensions/igrid.py: Patch by Nik Tautenhahn: |
|
9 | * IPython/Extensions/igrid.py: Patch by Nik Tautenhahn: |
@@ -245,6 +245,8 b" check(attr_mutator.called, 'ofind should be called in absence of assign characte" | |||||
245 | for c in list('!=()'): # XXX What about <> -- they *are* important above |
|
245 | for c in list('!=()'): # XXX What about <> -- they *are* important above | |
246 | attr_mutator.called = False |
|
246 | attr_mutator.called = False | |
247 | run_one_test('attr_mutator.foo %s should *not* mutate' % c, handle_normal) |
|
247 | run_one_test('attr_mutator.foo %s should *not* mutate' % c, handle_normal) | |
|
248 | run_one_test('attr_mutator.foo%s should *not* mutate' % c, handle_normal) | |||
|
249 | ||||
248 | check(not attr_mutator.called, |
|
250 | check(not attr_mutator.called, | |
249 | 'ofind should not be called near character %s' % c) |
|
251 | 'ofind should not be called near character %s' % c) | |
250 |
|
252 |
General Comments 0
You need to be logged in to leave comments.
Login now