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
In general, Parsley seems to not be very aware of Unicode. A specific manifestation of this problem, the documentation says:
letter:
Matches a single ASCII letter.
However, looking at the source code, I think it is doing something different. Looking at runtime.py, the class OMetaBase, the method letter() is implemented by calling str.isalpha(). The Python documentation describes isalpha as: Python 2.7: Depends on locale Python 3.5: Union of several Unicode categories
In other words, unless I am misunderstanding the source, the characters matched by letter will depend on version of Python and in version 2.7 will depend on locale. This should be documented.
ws and digit have similar problems, btw. The ws documentation says it "matches zero or more spaces, tabs, or newlines" but the implementation in the source appears to use str.isspace(), which has similar behavior to isalpha.
The text was updated successfully, but these errors were encountered:
In general, Parsley seems to not be very aware of Unicode. A specific manifestation of this problem, the documentation says:
However, looking at the source code, I think it is doing something different. Looking at
runtime.py
, the classOMetaBase
, the methodletter()
is implemented by callingstr.isalpha()
. The Python documentation describes isalpha as:Python 2.7: Depends on locale
Python 3.5: Union of several Unicode categories
In other words, unless I am misunderstanding the source, the characters matched by
letter
will depend on version of Python and in version 2.7 will depend on locale. This should be documented.ws
anddigit
have similar problems, btw. Thews
documentation says it "matches zero or more spaces, tabs, or newlines" but the implementation in the source appears to usestr.isspace()
, which has similar behavior to isalpha.The text was updated successfully, but these errors were encountered: