4 ms·
I have been conditioned to write code that is 2/3 compatible, that even when I am writing specifically for the PY3 interpreter the code turns out to be a __futu
by has2k1 9y ago
I have been conditioned to write code that is 2/3 compatible, that even when I am writing specifically for the PY3 interpreter the code turns out to be a __future__ import away from being valid PY2. I did not think much of them at first, but very recently, f-strings have changed that.
I think many people get imprinted with writing the PY3 code using only the features available at the time they switched over.
- orf 9y agoYou can use some backports of libraries though, surely? `pathlib` is in pip.
- has2k1 9y agoBack-ports are an option but they are an extra dependency. When you have not used a new feature, the cost of an extra dependency out weighs the unknown benefits that would be realised by using a back-port.