Re: [PATCH v3 6/8] git-remote-testpy: hash bytes explicitly
- From
Michael Haggerty <mhagger@alum.mit.edu>
- Date
- Jan 27, 2013, 08:41 UTC
- Message-ID
- <5104E827.2040906@alum.mit.edu>
- In-Reply-To
- <CAGdFq_icLDEdJJKHZsht8bXpZzSNProLt3F_u=0en2rFBvxLKw@mail.gmail.com>
On 01/27/2013 06:30 AM, Sverre Rabbelier wrote:
Show 7 quoted lines
> On Sat, Jan 26, 2013 at 8:44 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote: >> So to handle all of the cases across Python versions as closely as >> possible to the old 2.x code, it might be necessary to make the code >> explicitly depend on the Python version number, like: > > Does this all go away if we restrict ourselves to python 2.6 and just > use the b prefix?
repo.path ultimately comes from the command line, which means that it is a bytestring under Python 2.x and a Unicode string under Python 3.x. It does not come from a literal that could be changed to b"value". (Nor is a six.b()-like function helpful, if that is what you meant; that is also intended to wrap literal strings.)
Michael
-- Michael Haggerty mhagger@alum.mit.edu http://softwareswirl.blogspot.com/