[RFC] Adding Py3k support while maintaining compatibility with python <= 2.6
nicdumz at gmail.com
Thu Jun 3 10:08:48 CDT 2010
2010/6/3 Dirkjan Ochtman <dirkjan at ochtman.nl>:
> I'd prefer just using sys.exc_info(), mostly because I think it's a
> pattern that I think people will be able to recognize from other code
> bases that are getting ported. Using a util.exceptionvalue() really
> doesn't gain us anything, it only obscures the problem.
Any solution suits me, and difference sound cosmetic.
I would rather import everywhere mercurial.util than sys, but, really
it does not matter much to me.
> As for the octal constants, using constants could be fine. In terms of
> how much code is required for the workaround, it seems to me like just
> using int('666', 8) might be just as clear and require less other crap
> (importing os or referring to util.MODE_something).
int(octal_string, 8) looks very clean to me, and I'm happy that you
came up with this solution.
Thank you for the update, I really can't wait for you to poke around
the huge mercurial issue, which is "the bytes vs. unicode issue" as
you put it ;)
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
Nicolas Dumazet — NicDumZ
More information about the Mercurial-devel