def pack(self):
values = _BitArray(self.count*self.size)
for i in range(self.count):
offset = i * self.size
try:
values[offset:offset + self.size] = int(self.physical_range.scale_to(self.logical_range, self._values[i]))
except ArithmeticError:
# If the value is outside of the physical range, and NULLs are allowed, then do not modify the value
if not self.flags & ReportFlags.NULL_STATE:
raise
return values
评论列表
文章目录