John Arbash Meinel
john at arbash-meinel.com
Thu Dec 11 13:49:36 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Vincent Ladeuil wrote:
>>>>>> "vila" == Vincent Ladeuil <v.ladeuil+lp at free.fr> writes:
> jam> +
> jam> + break else: return chunks
> vila> Nit-picking: break that line into three, the 'return chunks' part
> vila> is the most important line of the function, don't hide it.
> Forget that, citation error, the code is indeed on 3 lines.
> *But* I have to remove the 'cur = 0' and 'cur += 1' lines to make
> pyrex happy (they seems useless anyway, debug lines left ?).
I would assume you only have to remove the "cur += 1" line, and replace
cur = cur + 1
Older versions of pyrex don't support "+=" notation. Newer versions do.
They are actually necessary, because we allow the last line to not be
newline terminated. (A lot of texts don't end with a newline.)
I could write the whole thing differently, buffering an entry if it
doesn't contain a newline and only failing if there is another entry.
But I'm pretty sure a test would fail, since there is:
"cur == chunks_len" later on.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar