How "return" no return ?

Bill Mill bill.mill at gmail.com
Thu May 12 14:31:17 EDT 2005


On 5/12/05, Ximo <elrei69 at yahoo.es> wrote:
> I am doing my own interpreter with the Python languaje.
> 
> Do you understand me?

Well, to be frank, no. However, Frederik's point still stands; in the
python langage, "int a" is syntactically invalid. If you're writing
your own interpreter, it should still be syntactically invalid.

Could you perhaps repeat your question with an example of what
behavior is surprising you?

Peace
Bill Mill
bill.mill at gmail.com

> 
> "Fredrik Lundh" <fredrik at pythonware.com> escribió en el mensaje
> news:mailman.484.1115919541.29826.python-list at python.org...
> > "Ximo" wrote:
> >
> >> I am doing a interpret of lines and it show me a prompt, and I want if I
> >> write a declaration as "int a" my progrtam return de prompt and nothing
> >> more, for exemple:
> >>
> >> >>> 2+2
> >> 4
> >> >>> int a
> >> >>>
> >>
> >> Then I'm finding that de function which execute "int a" return me
> >> nothing,
> >> and no
> >>
> >> >>> int a
> >> None
> >> >>>
> >
> > what Python version are you using?  here's what a normal Python
> > interpreter is supposed to do with your example:
> >
> >>>> 2+2
> > 4
> >>>> int a
> >  File "<stdin>", line 1
> >    int a
> >        ^
> > SyntaxError: invalid syntax
> >>>>
> >
> > </F>
> >
> >
> >
> 
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 
>



More information about the Python-list mailing list