def dict_from_int(version_int):
 d = {}
 rem = version_int
 (rem, d['pre_ver']) = divmod(rem, 100)
 (rem, d['pre']) = divmod(rem, 10)
 (rem, d['alpha_ver']) = divmod(rem, 100)
 (rem, d['alpha']) = divmod(rem, 10)
 (rem, d['minor3']) = divmod(rem, 100)
 (rem, d['minor2']) = divmod(rem, 100)
 (rem, d['minor1']) = divmod(rem, 100)
 (rem, d['major']) = divmod(rem, 100)
 d['pre'] = (None if d['pre'] else 'pre')
 d['alpha'] = {0: 'a', 1: 'b'}.get(d['alpha'])
 return d

def dict_from_int ( version_int ) : d = { } rem = version_int ( rem , d [ 'pre_ver' ] ) = divmod ( rem , 100 ) ( rem , d [ 'pre' ] ) = divmod ( rem , 10 ) ( rem , d [ 'alpha_ver' ] ) = divmod ( rem , 100 ) ( rem , d [ 'alpha' ] ) = divmod ( rem , 10 ) ( rem , d [ 'minor3' ] ) = divmod ( rem , 100 ) ( rem , d [ 'minor2' ] ) = divmod ( rem , 100 ) ( rem , d [ 'minor1' ] ) = divmod ( rem , 100 ) ( rem , d [ 'major' ] ) = divmod ( rem , 100 ) d [ 'pre' ] = ( None if d [ 'pre' ] else 'pre' ) d [ 'alpha' ] = { 0 : 'a' , 1 : 'b' } . get ( d [ 'alpha' ] ) return d
converts a version integer into a dictionary with major/minor/ .