Python style question
Aaron Bentley
aaron.bentley at utoronto.ca
Tue Jun 7 05:49:57 BST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John A Meinel wrote:
| Martin Pool wrote:
|
| The problem is that really you want a branch hierarchy. You can argue
| that you want a standard Branch object and a BranchStorage hierarchy. It
| doesn't really matter, but to me, that is just one more layer of
| indirection that you don't really need.
It reminds me of the PFS layer in Arch, and I think that's one of the
good things about Arch. A BranchStore acts as a bridge between the
high-level Branch object and the filesystem/network/etc.
Without that, you wind up doing the Template pattern all over the place,
or else reimplementing the same stuff in each Branch.
I can imagine it would be pretty easy to do things like locally-cached
branchstores, or multiple-source branchstores...
| request pipeline protocol. I'm not sure what functions would return a
| list of entries that we could pipeline, but it would certainly be a
| speed improvement if you could make a bunch of requests, and then wait
| for them on the other end.
You can certainly do something like return a PendingRequest object with
a finish() method to get the object you're actually interested in.
| I think the threads method is a little bit more straightforward to
| program. As then each object can have it's own downloading thread, and
| you can just ask the object if it is ready. But I guess a lot of people
| prefer the select() idiom.
Yeah, it's more performant, and I've heard bad things about Python's
threading. On the other hand, select can be tricky to get right.
Aaron
- --
Aaron Bentley
www.aaronbentley.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCpSd10F+nu1YWqI0RArGAAJ9Lo18Kqv2tuaajP6Rc6vXzANW92gCcDjIy
gup0qsVvjEAyQb3govdr3ns=
=rKnw
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list