>
> However, what's the purpose of global variables? I thought this conflicts
> with one of the examples in the Introduction chapter.
>
Which example?
I understand explicitly passing the variable will do the work.
However, what's the purpose of global variables? I thought this conflicts
with one of the examples in the Introduction chapter.
Secondly, I don't understand the different results between Example 1 and 2.
Something deeper is happenin
you need to pass it
return dict(t1=t1)
or
return locals()
http://zerp.ly/rochacbruno
Em 05/01/2012 12:03, "Peter O" escreveu:
> Hihi,
>
> I am baffled by what I see between Example 1 and 2.
>
> It may be a good case to improve my understanding of the run-time
> environment of web2py.
>
> Than
Hihi,
I am baffled by what I see between Example 1 and 2.
It may be a good case to improve my understanding of the run-time
environment of web2py.
Thanks in advance for any comments.
VIEW: (test.html)
{{=globals().get('t1', False)}}
CONTROLLER:
== Example 1 ==
def test():
global
4 matches
Mail list logo