This line:

left_sidebar_enabled=False,globals()

is not assigning the value False to left_sidebar_enabled. Instead, it is 
creating a tuple (False, globals()) and assigning the entire tuple to 
left_sidebar_enabled. A non-empty tuple evaluates to True, regardless of 
its contents.

Anthony

On Tuesday, April 23, 2013 12:23:22 AM UTC-4, 黄祥 wrote:
>
> hi folks,
>
> i've enabled sidebar in my views, but there is something i want to ask 
> about globals()
>
> e.g.
> {{left_sidebar_enabled=True}}
>
> {{block left_sidebar}}
> {{include 'default/left_sidebar.html'}}
> {{end}}
>
> will produce the same output with :
> {{left_sidebar_enabled=False,globals()}}
>
> {{block left_sidebar}}
> {{include 'default/left_sidebar.html'}}
> {{end}}
>
> did anyone know what is the difference of globals() in views part? why the 
> output produce is same with the assigned value is different (True and 
> False)?
>
> Many Thanks Before
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to