[pygobject/py3k: 17/20] No long under python 3
- From: John Ehresman <jpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/py3k: 17/20] No long under python 3
- Date: Thu, 15 Apr 2010 17:50:27 +0000 (UTC)
commit fb6529e5e6c253d5fcc0038eafc1c1d9e23ca9ae
Author: John Ehresman <jpe wingware com>
Date: Thu Apr 15 11:01:15 2010 -0400
No long under python 3
gobject/propertyhelper.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gobject/propertyhelper.py b/gobject/propertyhelper.py
index e299273..68e3a27 100644
--- a/gobject/propertyhelper.py
+++ b/gobject/propertyhelper.py
@@ -101,6 +101,9 @@ class property(object):
self.getter = getter
self.setter = setter
+ if sys.version_info >= (3, 0):
+ basestring = str
+
if type is None:
type = object
self.type = self._type_from_python(type)
@@ -175,7 +178,7 @@ class property(object):
return TYPE_INT
elif type == bool:
return TYPE_BOOLEAN
- elif type == long:
+ elif sys.version_info < (3, 0) and type == long:
return TYPE_LONG
elif type == float:
return TYPE_DOUBLE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]