"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Utils/WebInputMixin.py" between
cheetah3-3.1.0.tar.gz and cheetah3-3.2.0.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).

WebInputMixin.py  (cheetah3-3.1.0):WebInputMixin.py  (cheetah3-3.2.0)
skipping to change at line 39 skipping to change at line 39
conversion suffix strips off. Applies numeric conversion and conversion suffix strips off. Applies numeric conversion and
single vs multi values according to the comments in the source. single vs multi values according to the comments in the source.
""" """
# Step 1 -- split off the conversion suffix from 'name'; e.g. "height:int". # Step 1 -- split off the conversion suffix from 'name'; e.g. "height:int".
# If there's no colon, the suffix is "". 'longName' is the name with the # If there's no colon, the suffix is "". 'longName' is the name with the
# suffix, 'shortName' is without. # suffix, 'shortName' is without.
# XXX This implementation assumes "height:" means "height". # XXX This implementation assumes "height:" means "height".
colon = name.find(':') colon = name.find(':')
if colon != -1: if colon != -1:
longName = name longName = name
shortName, ext = name[:colon], name[colon+1:] shortName, ext = name[:colon], name[colon+1:] # noqa: E226,E501 missing whitespace around operator
else: else:
longName = shortName = name longName = shortName = name
ext = '' ext = ''
# Step 2 -- look up the values by calling 'func'. # Step 2 -- look up the values by calling 'func'.
if longName != shortName: if longName != shortName:
values = func(longName, None) or func(shortName, None) values = func(longName, None) or func(shortName, None)
else: else:
values = func(shortName, None) values = func(shortName, None)
# 'values' is a list of strings, a string or None. # 'values' is a list of strings, a string or None.
 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)