code: def sysinfo2float(version_info=sys.version_info):
      
      vers_str = '.'.join([str(v) for v in version_info[0:3]])
      if version_info[3] != 'final':
          vers_str += '.' + ''.join([str(i) for i in version_info[3:]])
  
      if IS_PYPY:
          vers_str += 'pypy'
      else:
          try:
              import platform
              platform = platform.python_implementation()
              if platform in ('Jython', 'Pyston'):
                  vers_str += platform
                  pass
          except ImportError:
              # Python may be too old, e.g. < 2.6 or implementation may
              # just not have platform
              pass
          except AttributeError:
              pass
      return py_str2float(vers_str)
docs: Convert a sys.versions_info-compatible list into a 'canonic'
      floating-point number which that can then be used to look up a
      magic number.  Note that this can only be used for released version
      of C Python, not interim development versions, since we can't
      represent that as a floating-point number.
  
      For handling Pypy, pyston, jython, etc. and interim versions of
      C Python, use sysinfo2magic.