bug fixes.
This commit is contained in:
parent
4942a60838
commit
ff279cc5ac
@ -6,8 +6,6 @@ import re
|
|||||||
import warnings
|
import warnings
|
||||||
from struct import unpack
|
from struct import unpack
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
|
|
||||||
class _StarDictIfo(object):
|
class _StarDictIfo(object):
|
||||||
"""
|
"""
|
||||||
@ -200,14 +198,14 @@ class _StarDictIdx(object):
|
|||||||
if not self._container.in_memory:
|
if not self._container.in_memory:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
'Iter dict items with in_memory=False may cause serious performance problem')
|
'Iter dict items with in_memory=False may cause serious performance problem')
|
||||||
for key in six.iterkeys(self._idx):
|
for key in self._idx.iterkeys():
|
||||||
yield key.decode('utf-8')
|
yield key.decode('utf-8')
|
||||||
|
|
||||||
def keys(self):
|
def keys(self):
|
||||||
"""
|
"""
|
||||||
returns keys
|
returns keys
|
||||||
"""
|
"""
|
||||||
if six.PY3:
|
if sys.version_info[0] == 3:
|
||||||
return self.iterkeys()
|
return self.iterkeys()
|
||||||
|
|
||||||
if not self._container.in_memory:
|
if not self._container.in_memory:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user