[MERGE] add _TestCase__testMethodDoc to attrs_to_keep, do attr saving more sanely

Aaron Bentley aaron at aaronbentley.com
Mon May 4 21:46:08 BST 2009


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

Michael Hudson wrote:
> I also changed the way the attributes were cleared to avoid sticking a
> bound method for 'id' into the instance dictionary, which added to my
> confusion when figuring this out.

bb:approve

I'm not sure whether using self.__dict__ is ultimately correct, but
Michael pointed out on IRC that we only write to self.__dict__, so
symmetry FTW.

It's also arguable that we shouldn't delete absent_attr, and should
instead do self.__dict__.get(attr_name, absent_attr).  In fact, if using
__dict__ is correct, maybe it makes more sense to iterate through
self.__dict__.

I'll submit.

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

iEYEARECAAYFAkn/VAoACgkQ0F+nu1YWqI0i7ACfTCpp+Y4pmGpjizi38F4b0gpn
q6gAn3cBimkEHpZXGi3IQoKvOKVoVhzm
=zW5V
-----END PGP SIGNATURE-----



More information about the bazaar mailing list