def calc_size(self): fmtiter = CalcSizeFormatIterator() fmtiter.interpret(self._fmt_str) return fmtiter.totalsize
def calcsize(fmt): fmtiter = CalcSizeFormatIterator() fmtiter.interpret(fmt) return fmtiter.totalsize
def _calcsize(space, format): fmtiter = CalcSizeFormatIterator() try: fmtiter.interpret(format) except StructError, e: raise e.at_applevel(space)
def calcsize(space, format): fmtiter = CalcSizeFormatIterator() try: fmtiter.interpret(format) except StructError, e: raise e.at_applevel(space)