You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importre# this worksre.compile('^(?:a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v)$')
# this failsre.compile('^(?:a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w)$')
but at least the error could hint that's because there are too many operations to handle, instead of:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: error in regex
'cause there is no error, strictly speaking, in that regex, it's a hard (default) limitation on MicroPython side.
Thanks.
Code of Conduct
Yes, I agree
The text was updated successfully, but these errors were encountered:
WebReflection
changed the title
docs: re,compile fails due ops > 127 but the error is misleading
docs: re.compile(...) fails due ops > 127 but the error is misleading
Apr 17, 2025
Documentation URL
No response
Description
Apparently this is expected to fail:
but at least the error could hint that's because there are too many operations to handle, instead of:
'cause there is no error, strictly speaking, in that regex, it's a hard (default) limitation on MicroPython side.
Thanks.
Code of Conduct
Yes, I agree
The text was updated successfully, but these errors were encountered: