From 365c3e8b73eab825a8ecd0cf8046e1a0824ccd45 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 2 Sep 2013 12:06:32 +0200 Subject: Replaced "not PY3" by "PY2", new in six 1.4.0. --- docs/topics/python3.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'docs/topics/python3.txt') diff --git a/docs/topics/python3.txt b/docs/topics/python3.txt index 9a0438e9e5..8f2306962b 100644 --- a/docs/topics/python3.txt +++ b/docs/topics/python3.txt @@ -376,15 +376,13 @@ explicitly tries both locations, as follows:: except ImportError: # Python 2 from urlparse import urlparse, urlunparse -PY3 +PY2 ~~~ -If you need different code in Python 2 and Python 3, check :data:`six.PY3`:: +If you need different code in Python 2 and Python 3, check :data:`six.PY2`:: - if six.PY3: - # do stuff Python 3-wise - else: - # do stuff Python 2-wise + if six.PY2: + # compatibility code for Python 2 This is a last resort solution when :mod:`six` doesn't provide an appropriate function. -- cgit v1.3