@ -147,9 +147,12 @@ else:
AnyTextType = (BytesType, UnicodeType)
if sys.version_info < (2, 5):
try:
next
except NameError:
next = lambda it: it.next()
#: Default size for calls to :meth:`Side.read` or :meth:`Side.write`, and the
#: size of buffers configured by :func:`mitogen.parent.create_socketpair`. This
#: value has many performance implications, 128KiB seems to be a sweet spot.
@ -63,6 +63,12 @@ from mitogen.core import b
from mitogen.core import LOG
from mitogen.core import IOLOG
# Python 2.4/2.5
from mitogen.core import next
itervalues = getattr(dict, 'itervalues', dict.values)