Python six is a library that might help with targeting both
Python six is a library that might help with targeting both
I think your advice might be well intended, but if followed will end up with an overloaded dev. and no new progress being made (and all that for the five guys who still don't have py3 installed)
Sorry to sound harsh, but I wish someone had told me that advice when I accepted to backport a py3 package to py2
I don't believe 2-3 compatibility must be ugly (though it certainly can be), but I'm glad you believe what you said. If that makes sense.
I really don't want to actually have source code that works on both, it's a pain to maintain. Although the future library should make it a lot nicer, but you still need a lot of ugly from __future__ imports as well.
In Python 3.6, kwargs are ordered. In all versions of Python, kwargs are a dict. Therefore, in any implementation of Python 3.6, dicts are ordered.
The dev team has stopped short of promising that dicts are ordered, but I can't see how one would realistically be harmed by assuming it to be true.
I'd expect backporting from 3 to 2 to be more of a pain than porting from 2 to 3.
You might have experience with both, but if not, this seems worth bearing in mind.