[patch] encodings again

John A Meinel john at arbash-meinel.com
Fri Dec 23 05:28:06 GMT 2005


Robert Collins wrote:
> On Thu, 2005-12-22 at 17:05 -0600, John A Meinel wrote:
>>
>> PS> In case you missed the discussion, the current rule for the main
>> branches (Robert & my integration branches, and probably bzr.dev) is
>> that we need 2 people to review the change and give it +1. If someone
>> else speaks up, I'll merge it into my integration branch. 
> 
> With one minor changes, +0
> 
> 
>> +        if hasattr(sys.stdout, "encoding"):
>> +            output_encoding = sys.stdout.encoding or
> bzrlib.user_encoding
>> +        else:
> 
> hasattr has problems - avoid it like measles.

Care to explain what the specific problems are? I've used it before, and
thought it was better to do a 'has' check, rather than to catch an
exception. Though you are recommending doing a get, and check vs None.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051222/aa8cacdf/attachment.pgp 


More information about the bazaar mailing list