def __init__(self, x=None):
if x is None:<EOL><INDENT>return<EOL><DEDENT>if not isinstance(x, (int, long)):<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>bits = sizeof(c_ulonglong)*<NUM_LIT:8><EOL>self.alloc = <NUM_LIT:0><EOL>self.used = <NUM_LIT:0><EOL>self.sign = BigInt.POSITIVE_FLAG if x >= <NUM_LIT:0> else BigInt.NEGATIVE_FLAG<EOL>x = abs(x)<EOL>while x > <NUM_LIT:0>:<EOL><INDENT>self.digits[self.used] = x % (<NUM_LIT:2>**bits)<EOL>self.used += <NUM_LIT:1><EOL>x >>= bits<EOL><DEDENT>
Initialize an empty BigInt or create one from a Python long value @x