"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Parser.py" between
cheetah3-3.2.1.tar.gz and cheetah3-3.2.2.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

Parser.py  (cheetah3-3.2.1):Parser.py  (cheetah3-3.2.2)
skipping to change at line 1410 skipping to change at line 1410
def configureParser(self): def configureParser(self):
super(_HighLevelParser, self).configureParser() super(_HighLevelParser, self).configureParser()
self._initDirectives() self._initDirectives()
def _initDirectives(self): def _initDirectives(self):
def normalizeParserVal(val): def normalizeParserVal(val):
if isinstance(val, (str, unicode)): if isinstance(val, (str, unicode)):
handler = getattr(self, val) handler = getattr(self, val)
elif isinstance(val, type): elif isinstance(val, type):
handler = val(self) handler = val(self)
elif hasattr(val, '__call__'): elif callable(val):
handler = val handler = val
elif val is None: elif val is None:
handler = val handler = val
else: else:
raise Exception('Invalid parser/handler value %r for %s' raise Exception('Invalid parser/handler value %r for %s'
% (val, name)) % (val, name))
return handler return handler
normalizeHandlerVal = normalizeParserVal normalizeHandlerVal = normalizeParserVal
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)