code: def inc(self, *args, **kwargs):
          ''' Atomically increment ``qfield`` by ``value`` '''
          pairs = []
          if len(args) == 1:
              pairs.append((args[0], 1))
          elif len(args) == 2:
              pairs.append(args)
          elif len(kwargs) != 0:
              pairs.extend([(k, v) for k, v in kwargs.items()])
          else:
              raise UpdateException('Invalid arguments for set.  Requires either two positional arguments or at least one keyword argument')
  
          ret = self
          for qfield, value in pairs:
              ret = self._atomic_op('$inc', qfield, value)
          return ref inc(self, *args, **kwargs):
          ''' Atomically increment ``qfield`` by ``value`` '''
          pairs = []
          if len(args) == 1:
              pairs.append((args[0], 1))
          elif len(args) == 2:
              pairs.append(args)
          elif len(kwargs) != 0:
              pairs.extend([(k, v) for k, v in kwargs.items()])
          else:
              raise UpdateException('Invalid arguments for set.  Requires either two positional arguments or at least one keyword argument')
  
          ret = self
          for qfield, value in pairs:
              ret = self._atomic_op('$inc', qfield, value)
          return ret
docs: Atomically increment ``qfield`` by ``value``