Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

No, this is not how fullmatch() works. Otherwise there wouldn't be need to add 
it into the stdlib. You could just check end() of the result.

fullmatch() acts like match() with added \Z. But if the pattern contains 
multiple alternates you need to add \Z at the end of every branch 
(r"foo\Z|bar\Z") or wrap the entire patch in a non-capturing group 
(r"(?:foo|bar)\Z").

----------
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32319>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to