(self, code, *args)
return result.get("retval", None)
**DEPRECATED**: Evaluate a JavaScript expression in MongoDB.

        :Parameters:
          - `code`: string representation of JavaScript code to be
            evaluated
          - `args` (optional): additional positional arguments are
            passed to the `code` being evaluated

        .. warning:: the eval command is deprecated in MongoDB 3.0 and
          will be removed in a future server version.
**DEPRECATED**: Evaluate a JavaScript expression in MongoDB.
** DEPRECATED ** : Evaluate a JavaScript expression in MongoDB .
def eval(self, code, *args):
        """**DEPRECATED**: Evaluate a JavaScript expression in MongoDB.

        :Parameters:
          - `code`: string representation of JavaScript code to be
            evaluated
          - `args` (optional): additional positional arguments are
            passed to the `code` being evaluated

        .. warning:: the eval command is deprecated in MongoDB 3.0 and
          will be removed in a future server version.
        """
        warnings.warn("Database.eval() is deprecated",
                      DeprecationWarning, stacklevel=2)

        if not isinstance(code, Code):
            code = Code(code)

        result = self.command("$eval", code, args=args)
        return result.get("retval", None)
def eval ( self , code , * args ) : warnings . warn ( "Database.eval() is deprecated" , DeprecationWarning , stacklevel = 2 ) if not isinstance ( code , Code ) : code = Code ( code ) result = self . command ( "$eval" , code , args = args ) return result . get ( "retval" , None )