-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mar 17, 2009, at 03:03 AM, Stephen J. Turnbull wrote:
If you document the style in a developer's guide or something like that, I'd rather not have the comment every time.
That's a good point, and I do intend to update the Mailman style guide to cover this.
"None" would seem to indicate "Yo! Initialize me!", and you'd check for that with "if data is None".
Exactly right.
"if not data" would be the case where either there never was anything to do, or nothing is left to do, so stop doing it. And if len(data) == 0 is a terminal condition for initialized data. So I don't think you need the comment.
Or are there other usages you have in mind that I've missed?
Nope, that about covers it. So maybe the comment is overkill given a(n updated) style guide to work from.
Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkm+oyAACgkQ2YZpQepbvXGHCQCfdYsd5pD56cIirnqGPZ+sOBUa woIAn2D4cpKo7/Bj++c7cXQEQr+Zysu3 =8SKO -----END PGP SIGNATURE-----