gh-90568: Fix exception type for \N with a named sequence in RE (GH-91665)

re.error is now raised instead of TypeError.
3 files changed