OT, is there a good guide somewhere for writing software which works in both 2.6+ and in 3.x?
then read the source code (very short) to six: https://bitbucket.org/gutworth/six/src/64891e65200f9853aa64d...
I don't actually pull in six, I just include those functions which I need locally, usually with some tweaks.