RFC: addCleanup should take *args and **kwargs?

Aaron Bentley aaron.bentley at utoronto.ca
Fri Apr 13 18:12:05 BST 2007


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

Vincent Ladeuil wrote:
>>>>>> "aaron" == Aaron Bentley <aaron.bentley at utoronto.ca> writes:

>     aaron> I don't think you can predict that
> 
>     aaron> 1. If a programmer mistakently adds a cleanup twice, that this fix will
>     aaron> catch it
>     aaron> 2. If a programmer adds a cleanup twice, it is a mistake.
> 
> self.addCleanup(restore_env_var, 'HOME')
> self.addCleanup(restore_env_var, 'BZRDIR')
> 
> was what I had in mind

self.addCleanup(wt.unlock)

is what I have in mind.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGH7nl0F+nu1YWqI0RAph0AJ432/t23Q5HNhCghuDV8zIJ7OL6ggCfVdLF
1LbwmuBu4skICrZgeHArQ6I=
=j4VB
-----END PGP SIGNATURE-----



More information about the bazaar mailing list