parameters: (self)
return_statement: return s
docstring: the method is used to encode an decimal object into the value of bson element
docstring_summary: the method is used to encode an decimal object into the value of bson element
docstring_tokens: the method is used to encode an decimal object into the value of bson element
function: def _to_bson_element_value(self):
          """the method is used to encode an decimal object into the value of bson element
          """
          _, s = decimal.toBsonElement(self.__decimal)
          if _ != 0:
              raise InvalidDecimal("invalid parameter, code: %d" % _)
          return s
function_tokens: def _to_bson_element_value ( self ) : _ , s = decimal . toBsonElement ( self . __decimal ) if _ != 0 : raise InvalidDecimal ( "invalid parameter, code: %d" % _ ) return s