Generator not generating
Delaney, Timothy C (Timothy)
tdelaney at avaya.com
Thu Jul 22 20:45:24 EDT 2004
Jeff Lowery wrote:
> def plot_dist(self):
> file = None;
>
> file = nextFile().next() # call to generator here
^^^^^^^^^^
> I trace through this in the debugger and the call to nextFile().next()
> always starts at the beginning of the function (it always returns the
> first file in C:/somedir).
>
> So what stoopid mistake am I overlooking here? I am running v2.3, BTW.
You're restarting the generator every time ...
Tim Delaney
More information about the Python-list
mailing list