|
From: Ray D. <ray...@ya...> - 2005-09-21 15:08:36
|
Hi Ivan,
This seems to be fixed in 2.2:
>>> x = { 'a' : 1, 'c' : 9, 'e' : 15 }
>>> x
{'a': 1, 'e': 15, 'c': 9}
>>> for i in x:
... print i
...
a
e
c
What are you trying to achieve here? you want to loop
over keys? values? items?
Cheers,
Ray
--- Ivan Hernandez <ihe...@ci...>
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 = {}
> >>> 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 ??
> thanks.
>
> Ivan Hernandez
>
>
>
-------------------------------------------------------
> 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
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
|