Python 2.6 fixes

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2008-11-18 14:32:45 +00:00
1 parent 7d08ccf1c4
commit ce804f486a
4 files changed
+11 -7

No files matched your search

+3 -1
View File
@@ -21,7 +21,9 @@ from pytypeobject import PyTypeObject, PyNumberMethods
import settings
import utils
if 'set' not in dir(__builtins__):
try:
set
except AttributeError:
from sets import Set as set
@@ -3,8 +3,9 @@ import tokenizer
MODIFIERS = ['const', 'volatile'] # XXX: are there others?
if 'set' not in dir(__builtins__):
# Nominal support for Python 2.3.
try:
set
except AttributeError:
from sets import Set as set
@@ -29,8 +29,9 @@ import sys
DEBUG = False
if 'set' not in dir(__builtins__):
# Nominal support for Python 2.3.
try:
set
except AttributeError:
from sets import Set as set
+2 -2
View File
@@ -30,7 +30,7 @@ class WrapperRegistry(object):
raise NotImplementedError
class NullWrapperRegistry(object):
class NullWrapperRegistry(WrapperRegistry):
"""
A 'null' wrapper registry class. It produces no code, and does
not guarantee that more than one wrapper cannot be created for
@@ -56,7 +56,7 @@ class NullWrapperRegistry(object):
pass
class StdMapWrapperRegistry(object):
class StdMapWrapperRegistry(WrapperRegistry):
"""
A wrapper registry that uses std::map as implementation. Do not
use this if generating pure C wrapping code, else the code will