On Mon, Nov 5, 2012 at 9:30 AM, Steven D'Aprano <email@example.com> wrote:
On Mon, Nov 05, 2012 at 02:08:33AM +0000, Oscar Benjamin wrote:
> There are certain cases where explicitly checking the version makes
> sense. I think that Python 3 vs Python 2 is sometimes such a case.
> Python 3 changes the meaning of a number of elementary aspects of
> Python so that the same code can run without error but with different
> semantics under the two different version series.
In any case, arguments about defensive coding style are getting
off-topic. The point is that there are various ways to test for the
existence of features, and adding yet another coarse-grained test
"sys.py3k" doesn't gain us much (if anything).