[MERGE] Clean up Branch.sprout
John Arbash Meinel
john at arbash-meinel.com
Thu Aug 28 21:31:55 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aaron Bentley wrote:
...
>> It seems a bit more obvious, and I thought the Format objects were meant to be
>> (mostly) singletons anyway. (We are a bit inconsistent about this, IIRC.)
>
> I don't think we're suggesting that these are singletons anywhere. It's
> just that their instances don't really have state. (Metadirs formats do
> have state, though.)
At various points we register *instances* of format objects, rather than their
classes. Which would indicate (to me) that they are singletons. Since doing:
registry.get().__class__()
Is certainly never going to be a *recommended* api.
>
> I was following the pattern used elsewhere (including this function),
> but I don't think there's any practical harm in changing this. I'll do
> that, so we don't have to back-and-forth on this.
>
> Aaron
If it is used elsewhere in this fashion (especially in this function) then
continue to use __class__(). I just find it strange.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFItws7JdeBCYSNAAMRAiE5AJkB+R2yoVPplIO60dTkfL4kf/WNXACeNSOz
XdJ+ACm6Q1T4EJPj6FeL7Zo=
=r3ac
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list