> > If we want to be consistent with other things like the hgclient API,
> > maybe we shouldn't be nice and encode the string for the caller, and
> > instead reject anything that's not bytes?
> 
> Sounds good to reject unicodes explicitly.

I had sent a v2 of my patch with a better way to encode the string, but now 
that I'm checking the hgclient code I don't think it explicitly rejects unicode 
strings? I think it just dies very quickly as soon as it tries to concatenate a 
string and a bytes.
Is there some other precedent for rejecting arguments explicitly? Is it just 
about raising some ValueError exception?
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to