On Fri, 2015-04-24 at 16:07 -0400, Sean Toner wrote:
> What I meant by the worst of both worlds is that you don't get the nice 
> new features of python3, while simultaneously dealing with the headaches 
> of making code run under both python versions.  You'll have to do weird 
> things with imports (for example urllib) and deal with the 
> inconsistencies between some functions that return strings and some that 
> return unicode, and some that return bytes.
> 
> It's not impossible, but you have to add that extra work while also 
> depriving yourself of the goodness of python3 only features :)

This is why the 'six' library is such a godsend; this stuff is still not
easy, but the hardest parts, like the imports problem, are already taken
care of by six…and maintaining the bytes/strings/unicode distinction is
actually just as useful in Python 2, it just doesn't have the machinery
to really detect the mixing :)
-- 
Kevin L. Mitchell <kevin.mitch...@rackspace.com>
Rackspace


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to