[PATCH 3/3] pwclient: basic python3 support

Mike Frysinger vapier at gentoo.org
Sat Oct 17 10:12:05 AEDT 2015


On 16 Oct 2015 16:01, Brian Norris wrote:
> On Fri, Oct 16, 2015 at 10:49:04PM +0000, Finucane, Stephen wrote:
> > > Looks good to me, though I'm still a little green on Python 2/3
> > > compatibility. I've been runnning this (plus other patches) since you
> > 
> > What are your thoughts on the use of 'six' for this stuff? Would it help you here?
> 
> I'm not very familiar, but before reading this email I was trying to
> figure out the "best" interoperable way to replace dict.iteritems(), and
> I see we could use six.iteritems(). So my initial review says "sure"!

dict.items() should work fine in both.  the question becomes whether the dict
is so large that coercing it to a list first adds significant overhead.  i've
found that generally it doesn't.

> Except then, we rely on PyPy and nonstandard libraries which doesn't
> seem too good to me for such a small utility :(

six is a pretty common module.  i wouldn't worry about requiring it.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/patchwork/attachments/20151016/44887364/attachment.sig>


More information about the Patchwork mailing list