independent listutils + Python 3 support

This commit is contained in:
Mahmoud Hashemi 2015-04-10 14:42:34 -07:00
parent e38b7a8fe0
commit 9968013885
1 changed files with 10 additions and 2 deletions

View File

@ -15,9 +15,17 @@ import operator
from math import log as math_log
from itertools import chain, islice
from .compat import make_sentinel, xrange
_MISSING = make_sentinel(var_name='_MISSING')
try:
from compat import make_sentinel
_MISSING = make_sentinel(var_name='_MISSING')
except ImportError:
_MISSING = object()
try:
xrange
except NameError:
# Python 3 compat
xrange = range
# TODO: expose splaylist?
__all__ = ['BList', 'BarrelList']