[rfc] avoid assert statements?

Alexander Belchenko bialix at ukr.net
Tue Oct 2 06:05:29 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool пишет:
> OK, I filed:
> 
> https://bugs.edge.launchpad.net/bzr/+bug/147927
> "use python -O (assertions off) when running installed copy"
> 
> As I say there, I'm not sure how to make -O take effect on Windows.

For standalone bzr.exe it's possible to force -O.
For usual python-based installation: it's depends on user's settings only.

> As far as coding standards, I wouldn't say never to use assertions, but
> certainly to consider whether either an explicit if/raise, or just
> omitting the check would be more appropriate.

I can say that at least one assertion in Aaron's multiparent code
allows me to catch and fix win32-specific bug with that code.
IMO in that particular case it's OK to change them to verbatim
explicit check for correctness of input data.

- --
[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHAdGZzYr338mxwCURArvUAKCPT1Eo3MMA250/Xh/qg6nt21ViRACeJOix
GupDsXqswKcuwcz6OgGePUc=
=qEnD
-----END PGP SIGNATURE-----



More information about the bazaar mailing list