py3: fix comparison between int and None
If stop is None, the condition was always false on Python 2, as None compares
smaller than ints. Therefore we make the condition false if stop is None.
#require docutils gettext $ $TESTDIR/check-gendoc el checking for parse errors