summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2007-08-17 07:45:32 +0200
committergbrandl <devnull@localhost>2007-08-17 07:45:32 +0200
commit5b9f5540856fc18c22348f4346817d9d39a920f8 (patch)
tree52aae43c8d1e801c3ca1238ce01f5b2d566609c5
parent769751f93a39431f417c2d03944f84f7cf42b71e (diff)
downloadpygments-5b9f5540856fc18c22348f4346817d9d39a920f8.tar.gz
[svn] Fix in the Python lexer, 2.6 compatibility fixes.
-rw-r--r--pygments/lexer.py3
-rw-r--r--pygments/lexers/agile.py5
-rw-r--r--pygments/token.py4
3 files changed, 9 insertions, 3 deletions
diff --git a/pygments/lexer.py b/pygments/lexer.py
index be1e07db..20096677 100644
--- a/pygments/lexer.py
+++ b/pygments/lexer.py
@@ -230,7 +230,8 @@ class combined(tuple):
return tuple.__new__(cls, args)
def __init__(self, *args):
- tuple.__init__(self, args)
+ # tuple.__init__ doesn't do anything
+ pass
class _PseudoMatch(object):
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py
index f518379a..1dfd80df 100644
--- a/pygments/lexers/agile.py
+++ b/pygments/lexers/agile.py
@@ -195,6 +195,11 @@ class PythonConsoleLexer(Lexer):
insertions.append((len(curcode),
[(0, Generic.Prompt, line[:4])]))
curcode += line[4:]
+ elif line.rstrip() == '...':
+ tb = 0
+ insertions.append((len(curcode),
+ [(0, Generic.Prompt, '...')]))
+ curcode += line[3:]
else:
if curcode:
for item in do_insertions(insertions,
diff --git a/pygments/token.py b/pygments/token.py
index 66183955..f45ac284 100644
--- a/pygments/token.py
+++ b/pygments/token.py
@@ -26,8 +26,8 @@ class _TokenType(tuple):
buf.reverse()
return buf
- def __init__(self, *args, **kwargs):
- super(_TokenType, self).__init__(*args, **kwargs)
+ def __init__(self, *args):
+ # no need to call super.__init__
self.subtypes = set()
def __contains__(self, val):