mirror of https://github.com/python/cpython.git
Changed setpf so it understands old-style packfactors
This commit is contained in:
parent
18c9a4f8ea
commit
f3f753132a
|
@ -272,6 +272,8 @@ def getformat(self):
|
|||
|
||||
def setpf(self, pf):
|
||||
if self.frozen: raise CallError
|
||||
if type(pf) == type(1):
|
||||
pf = (pf, pf)
|
||||
if type(pf) is not type(()) or len(pf) <> 2: raise CallError
|
||||
self.packfactor = pf
|
||||
self.setderived()
|
||||
|
|
Loading…
Reference in New Issue