diff options
author | gbrandl <devnull@localhost> | 2006-10-30 10:52:36 +0100 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2006-10-30 10:52:36 +0100 |
commit | 5555cc89b14f0d30438d04eb535ca8c61fa6bd8a (patch) | |
tree | 152353a7fc55194412e5f871ea85451e0873e1f9 /pygments/lexer.py | |
parent | 2c0b1bae7a5f3416b75ca76fc93cad8bf422a08d (diff) | |
download | pygments-5555cc89b14f0d30438d04eb535ca8c61fa6bd8a.tar.gz |
[svn] More pylint fixes, update BBcode formatter to new style API.
Diffstat (limited to 'pygments/lexer.py')
-rw-r--r-- | pygments/lexer.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pygments/lexer.py b/pygments/lexer.py index 51bacdbd..1b55c5d0 100644 --- a/pygments/lexer.py +++ b/pygments/lexer.py @@ -15,7 +15,6 @@ try: except NameError: from sets import Set as set -from types import FunctionType from pygments.token import Error, Text, Other, _TokenType from pygments.util import get_bool_opt, get_int_opt, make_analysator @@ -372,14 +371,14 @@ class RegexLexer(Lexer): #: current one. tokens = {} - def get_tokens_unprocessed(self, text, stack=['root']): + def get_tokens_unprocessed(self, text, stack=('root',)): """ Split ``text`` into (tokentype, text) pairs. ``stack`` is the inital stack (default: ``['root']``) """ pos = 0 - statestack = stack[:] + statestack = list(stack) statetokens = self._tokens[statestack[-1]] while 1: for rex, action, new_state in statetokens: |