According to sources, both ways are expected to work.

def read_var(self, text):
        r"""Reads a var statement.

            >>> read_var = Parser().read_var
            >>> read_var('var x=10\nfoo')
            (<var: x = 10>, 'foo')
            >>> read_var('var x: hello $name\nfoo')
            (<var: x = join_(u'hello ', escape_(name, True))>, 'foo')
        """

Because, if I use only the second one, then how do i define list
variable?


On Apr 7, 11:08 pm, Pablo Antonio <[email protected]> wrote:
> 2010/4/7 andrei <[email protected]>:
>
> > I assume both syntaxes for $var should work.
>
> Why?
>
>
>
> > $var title ="Вход"
>
> > $var title: Вход
>
> > But the 1st one raises an exception.
>
> That's correct. The second one is how it must be done, according to
> the documentation[1]. If something doesn't work as you expect it, it
> isn't necessary a bug.
>
> Thanks,
>
> [1]http://webpy.org/docs/0.3/templetor#var
>
> --
> Pablo Antonio (AKA crazy2k)http://www.pablo-a.com.ar/

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to