|
From: Ivan H. <ihe...@ci...> - 2005-09-21 19:37:20
|
=46ine. Thanks to all you for the response.
It worked right as expected and solved my problem!
Thanks again and keep reading!!
Ivan Hernandez
El Mi=E9 21 Sep 2005 11:55, Kent Johnson escribi=F3:
> Ivan Hernandez wrote:
> > Hello... i have this problem:
> >
> > ihernandez@cinemasoft:~/documentos/src/jserver$ jython
> > Jython 2.1 on java1.4.2-02 (JIT: null)
> > Type "copyright", "credits" or "license" for more information.
> >
> >>>>x =3D {}
> >>>>print x
> >
> > {}
> >
> >>>>for i in x:
> >
> > ... print i
> > ...
> > Traceback (innermost last):
> > File "<console>", line 1, in ?
> > TypeError: loop over non-sequence
> >
> > But in python it works fine.
> > How can i loop items ??
>
> Use
> for i in x.keys():
> or jython 2.2 alpha; direct iteration over dicts was added in Python 2.2.
>
> Kent
>
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server.
> Download it for free - -and be entered to win a 42" plasma tv or your very
> own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> Jython-users mailing list
> Jyt...@li...
> https://lists.sourceforge.net/lists/listinfo/jython-users
|