Changeset 153:a8b8beb4b0dd for imapclient
- Timestamp:
- 05/08/10 09:59:08 (2 years ago)
- Branch:
- default
- Files:
-
- 1 modified
-
imapclient/response_lexer.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
imapclient/response_lexer.py
r152 r153 40 40 SPECIALS = r' ()%"' + CTRL_CHARS 41 41 ALL_CHARS = [chr(ch) for ch in range(256)] 42 NON_SPECIALS = [ch for ch in ALL_CHARS if ch not in SPECIALS] 42 NON_SPECIALS = frozenset([ch for ch in ALL_CHARS if ch not in SPECIALS]) 43 WHITESPACE = frozenset(' \t\r\n') 43 44 44 45 def __init__(self): 45 self.wordchars = set(self.NON_SPECIALS)46 self.whitespace = set((' \t\r\n'))47 46 self.sources = None 48 47 self.current_source = None … … 68 67 69 68 def read_token_stream(self, stream_i): 70 whitespace = self. whitespace71 wordchars = self. wordchars69 whitespace = self.WHITESPACE 70 wordchars = self.NON_SPECIALS 72 71 parse_quote = self.parse_quote 73 72
