1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
Known Bugs in Cheetah
--------------------------
See the file CHANGES for a list of bugs that have been resolved.
Developers: if a bug was significant and affected a released version of
Cheetah, be sure to note its fix in the CHANGES file!
Clash between searchList and locally assigned variables
=======================================================
@@TR 2004-12-30: I'm about to checkin some changes that will fix this.
On Saturday 31 January 2004 05:29, <psyche@mensa.org.pl> wrote:
from Cheetah.Template import Template as tmpl
print tmpl( \
'''
#if False
#for $a in [1]:
#end for
#end if
$a
''', searchList=[{'a': 3}])
throws exception:
Traceback (most recent call last):
File "P:\python\cheetah\bug.py", line 16, in ?
print t
File "<string>", line 36, in respond
UnboundLocalError: local variable 'a' referenced before assignment
...it shouldn't, right?
Compiler forgets commas
=======================
@@TR: This is not a bug. Python and Cheetah's syntax requires commas.
# Affects Cheetah 0.9.14, CVS and possibly earlier.
# - fix bug in Parser.getDefArgList() that is mucking up lists where the comma has
# been forgotten:
#
# > #cache timer='.5m' id='cache1'
# > This is a cached region. $voom
# > #end cache
# >
# > the error is:
# >
# > "/local/opt/Python/lib/python2.2/site-packages/Webware/Cheetah/Compiler.py",
# > line 102, in genCacheInfoFromArgList
# > val = self.genTimeInterval(val)
# > File
# > "/local/opt/Python/lib/python2.2/site-packages/Webware/Cheetah/Compiler.py",
# > line 75, in genTimeInterval
# > interval = float(timeString)*60
# > ValueError: invalid literal for float(): .5m' id'cache1
# >
# >
# > Running under pdb shows that Parser.getDefArgList() returned:
# > "30m' id'cache1" .
#
|