Skip to content

Commit

Permalink
Merge pull request #91 from IlyaSkriblovsky/pypy-builtins-fix
Browse files Browse the repository at this point in the history
__builtins__["len"] -> __builtins__.len for PyPy
  • Loading branch information
psi29a committed May 13, 2015
2 parents a7c9f18 + 3306151 commit e6dd79f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion txmongo/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from collections import namedtuple
import struct
import __builtin__

import base64
import hmac
Expand Down Expand Up @@ -73,7 +74,7 @@ class KillCursors(namedtuple("KillCursors", ["len", "request_id", "response_to",
"zero", "n_cursors", "cursors"])):
def __new__(cls, len=0, request_id=0, response_to=0, opcode=OP_KILL_CURSORS,
zero=0, n_cursors=0, cursors=None):
n_cursors = __builtins__["len"](cursors)
n_cursors = __builtin__.len(cursors)
return super(KillCursors, cls).__new__(cls, len, request_id, response_to,
opcode, zero, n_cursors, cursors)

Expand Down

0 comments on commit e6dd79f

Please sign in to comment.