This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from struct import Struct | |
from recordtype import recordtype | |
def populate(value, mask): | |
mask = mask[-1] | |
if value: | |
return value | |
elif mask in 'bBhHiIlLqQfd': | |
return 0 | |
elif mask in 'sp': |