Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Cheetahtemplate-discuss] UnboundLocalError

Expand Messages
  • Tavis Rudd
    That certainly does look like a bug. I ve added it to our BUGS list. ... The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools
    Message 1 of 2 , Jan 31, 2004
      That certainly does look like a bug. I've added it to our BUGS list.

      On Saturday 31 January 2004 05:29, psyche wrote:
      > python 2.3.3
      > os: linux fedora and windows xp
      > cheetach v.0.9.15
      >
      > code:
      >
      > ------- <bug.py> -------
      >
      > #!/usr/bin/env python
      > from Cheetah.Template import Template as tmpl
      >
      > print tmpl( \
      > '''
      > #if False
      > #for $a in [1]:
      > #end for
      > #end if
      >
      > $a
      > ''', searchList=[{'a': 3}])
      >
      > ------- </bug.py> -------
      >
      > 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?
      >
      > /pd
      >
      >
      >
      > -------------------------------------------------------
      > The SF.Net email is sponsored by EclipseCon 2004
      > Premiere Conference on Open Tools Development and Integration
      > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
      > http://www.eclipsecon.org/osdn
      > _______________________________________________
      > Cheetahtemplate-discuss mailing list
      > Cheetahtemplate-discuss@...
      > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss



      -------------------------------------------------------
      The SF.Net email is sponsored by EclipseCon 2004
      Premiere Conference on Open Tools Development and Integration
      See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
      http://www.eclipsecon.org/osdn
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    Your message has been successfully submitted and would be delivered to recipients shortly.