[merge] cleanup remerge tests

John Arbash Meinel john at arbash-meinel.com
Thu Jun 29 18:16:38 BST 2006


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

Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> So how about if I add:
>>>
>>> kwargs.setdefault('retcode', 3)
>>>
>>> I would be okay with that. I added a test case for 'run_bzr_error', see
>>> the new bundle.
> 
> Sweet.  I'll have to remember setdefault.
> 
> Aaron

So is that a +1?

I found setdefault() because of loops like this:

map = {}
for x in iter:
  map.setdefault(x,[]).append(x.foo)

rather than an if/then around has_key or in.
Extra interesting because it returns the current object.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEpAr2JdeBCYSNAAMRAry8AKCI++O/o0jr6raPXk9ht4glSFuvgwCghmP5
IuVo1OhyLUPjFJhha/gyd+E=
=CKjn
-----END PGP SIGNATURE-----




More information about the bazaar mailing list