class_docstr: An object that parses version numbers such as::
  
      12.2.5b
  
  The filter supports a limited subset of PEP 386 versions including::
  
      1
      1.2
      1.2c
      1.2c3
      1.2.3
      1.2.3a
      1.2.3b4
      10.7.5rc1
      999.999.999c999
class_docstr_tok: ["An","object","that","parses","version","numbers","such","as",":",":","12.2.5b","The","filter","supports","a","limited","subset","of","PEP","386","versions","including",":",":","1","1.2","1.2c","1.2c3","1.2.3","1.2.3a","1.2.3b4","10.7.5rc1","999.999.999c999"]
code: def to_int(self):
      assert self.major < 1024
      n = self.major << 34
  
      assert self.minor < 1024
      n |= self.minor << 24
  
      assert self.release < 1024
      n |= self.release << 14
  
      exbits = self._ex_bits.get(self.ex, 15)
      n |= exbits << 10
  
      assert self.exnum < 1024
      n |= self.exnum
  
      return n
  
file_path: whoosh/src/whoosh/util/versions.py
imports: from whoosh.util.text import rcompile
label_desc: Use image node_id 2 for calling the SimpleVersion obj's underlying member method code with example usage: obj.to_int() and returns: n