def __repr__(self): return "ResolutionInfo(h_res=%s, h_res_unit=%s, v_res=%s, v_res_unit=%s, width_unit=%s, height_unit=%s)" % ( self.h_res, DisplayResolutionUnit.name_of(self.h_res_unit), self.v_res, DisplayResolutionUnit.name_of(self.v_res_unit), DimensionUnit.name_of(self.width_unit), DimensionUnit.name_of(self.height_unit) )
def __repr__(self): return "ResolutionInfo(h_res=%s, h_res_unit=%s, v_res=%s, v_res_unit=%s, width_unit=%s, height_unit=%s)" % ( self.h_res, DisplayResolutionUnit.name_of(self.h_res_unit), self.v_res, DisplayResolutionUnit.name_of(self.v_res_unit), DimensionUnit.name_of(self.width_unit), DimensionUnit.name_of(self.height_unit), )
def _repr_pretty_(self, p, cycle): if cycle: p.text(repr(self)) else: p.begin_group(2, 'ResolutionInfo(') p.begin_group(0) p.break_() p.text("h_res = %s," % self.h_res) p.break_() p.text("h_res_unit = %s," % DisplayResolutionUnit.name_of(self.h_res_unit)) p.break_() p.text("v_res = %s," % self.v_res) p.break_() p.text("v_res_unit = %s," % DisplayResolutionUnit.name_of(self.v_res_unit)) p.break_() p.text("width_unit = %s," % DimensionUnit.name_of(self.width_unit)) p.break_() p.text("height_unit = %s" % DimensionUnit.name_of(self.height_unit)) p.end_group(2) p.break_() p.end_group(0, ')')