Update py3.py.


git-svn-id: https://svn.apache.org/repos/asf/libcloud/branches/py3k@1209974 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/libcloud/py3.py b/libcloud/py3.py
index b88f2ff..2a1b3fe 100644
--- a/libcloud/py3.py
+++ b/libcloud/py3.py
@@ -14,6 +14,9 @@
 # limitations under the License.
 
 # Libcloud Python 2.x and 3.x compatibility layer
+# Some methods bellow are taken from Django PYK3 port which is licensed under 3
+# clause BSD license
+# https://bitbucket.org/loewis/django-3k
 
 from __future__ import absolute_import
 
@@ -21,6 +24,7 @@
 import types
 
 PY3 = False
+PY2 = False
 PY25 = False
 
 if sys.version_info >= (3, 0):
@@ -39,7 +43,6 @@
     def method_type(callable, instance, klass):
         return types.MethodType(callable, instance or klass())
 
-    # Taken from django.utils.py3
     bytes = __builtins__['bytes']
     def b(s):
         if isinstance(s, str):
@@ -56,6 +59,7 @@
     def dictvalues(d):
         return list(d.values())
 else:
+    PY2 = True
     import httplib
     from StringIO import StringIO
     import urllib
@@ -69,7 +73,6 @@
 
     method_type = types.MethodType
 
-    # Taken from django.utils.py3
     b = bytes = str
     def byte(n):
         return n