Can't Iterate

Chris Rebert clp2 at rebertia.com
Thu Dec 17 02:32:16 EST 2009


On Wed, Dec 16, 2009 at 11:26 PM, Victor Subervi
<victorsubervi at gmail.com> wrote:
> Hi;
> I have this line of code:
>
> for store in ourStores():
>
> which is called from the statement:
>
> from particulars import ourStores
>
> The latter file has the following:
>
> def ourStores():
>   return ['prescriptions', 'products']
>
> Yet, the above iteration only iterates the last of these items ('products').
> Why?

To put it mildly: Unable to reproduce the problem.
Post a more complete code sample. For instance, include whatever
debugging code is leading you to believe that only "products" is being
yielded by the iteration.

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list