[MERGE] Fix bug #229076 by fixing header names before sending the request.
Vincent Ladeuil
v.ladeuil+lp at free.fr
Sun May 18 11:38:54 BST 2008
>>>>> "Andrew" == Andrew Bennetts <andrew at canonical.com> writes:
Andrew> Matt Nordhoff wrote:
Andrew> [...]
>> Not that it matters, but...
>>
>> > + headers = dict((name.title(), val) for name, val in headers.items())
>>
>> Why not iteritems()?
Andrew> Well, you could just as easily ask “Why iteritems()?” ;)
Andrew> I highly doubt there will be a measurable performance
Andrew> benefit to bzr either way,
Sure.
On the other hand a few lines above (not shown by the patch),
headers is build as a copy of other attributes, so doing yet
another copy with items() doesn't make sense either and is a
waste.
Andrew> so we may as well use the simpler, shorter method
Andrew> name. In fact, I would not be at all surprised to
Andrew> find that items() is faster than iteritems() for
Andrew> dicts of that size...
Andrew> Basically, it doesn't matter either way.
True. English people talk about bike-shedding, French people talk
about sodomizing flies (with an emphasis on the uselessness and
the difficulties involved ;-)
A particular fly specie is called drosophila
(http://en.wikipedia.org/wiki/Drosophila) mostly known in genomic
research and especially small.
Here we are drosodomizing (coined while rebuilding our kitchen
regarding our tendency to perfectionism).
Vincent
More information about the bazaar
mailing list