Question regarding checksuming of a file
Heiko Wundram
me+python at modelnine.org
Sun May 14 17:15:49 EDT 2006
Am Sonntag 14 Mai 2006 22:29 schrieb Paul Rubin:
> Andrew Robert <andrew.arobert at gmail.com> writes:
> > When I run the script, I get an error that the file object does not have
> > the attribute getblocks.
>
> Woops, yes, you have to call getblocks(f). Also, Heiko says you can't
> use "return" to break out of the generator; I thought you could but
> maybe I got confused.
Yeah, you can. You can't return <arg> in a generator (of course, this raises a
SyntaxError), but you can use return to generate a raise StopIteration. So,
it wasn't you who was confused... ;-)
--- Heiko.
More information about the Python-list
mailing list