def __parse(self, line):
        """Split the reference into book, chapter, and verse range."""
        try:
            book, addr = line.rsplit(' ', 1)
            book = self.BOOKS.index(book) + 1
            if ':' not in addr:
                return book, int(addr), None, None
            chap, vers = addr.split(':')
            chap = int(chap)
            if '-' in vers:
                vers_a, vers_b = list(map(int, vers.split('-')))
            else:
                vers_a = vers_b = int(vers)
            return book, chap, vers_a, vers_b
        except:
            return None, None, None, None
Split the reference into book, chapter, and verse range.
recipes/Python/577049_Bible_Verse_Quiz__librarypy/recipe-577049.py