Lines Matching refs:cls
159 NEWOBJ = b'\x81' # build object by applying cls.__new__ to argtuple
635 cls, args, kwargs = args
636 if not hasattr(cls, "__new__"):
639 if obj is not None and cls is not obj.__class__:
643 save(cls)
648 func = partial(cls.__new__, cls, *args, **kwargs)
662 # def __newobj__(cls, *args):
663 # return cls.__new__(cls, *args)
667 # cls, the remaining args tuple, and the NEWOBJ code,
668 # which calls cls.__new__(cls, *args) at unpickling time
679 cls = args[0]
680 if not hasattr(cls, "__new__"):
683 if obj is not None and cls is not obj.__class__:
687 save(cls)
1507 cls = args.pop(0)
1508 self._instantiate(cls, args)
1513 cls = self.stack.pop()
1514 obj = cls.__new__(cls, *args)
1521 cls = self.stack.pop()
1522 obj = cls.__new__(cls, *args, **kwargs)