-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use regex instead of re? #162
Comments
Hi Julien, |
Hello @buhl , I had considered manually generating a list of acceptable characters (see here), but was not sure whether that would be considered best practice or not. Thanks! |
This might not be the right place, but @erikrose could you please document the meaning of |
this resolves jenstroeger's comment in issue #162
@jenstroeger when in doubt, file a new issue. They're cheap. This time there's no need, however, since I addressed this with 6e52df0 |
Some more background for the original issue: According to https://bugs.python.org/issue12731, it looked like I understand @erikrose has (had?) other ambitions for Parsimonious, but unless a new contributor appears I don't expect to realize the dream of removing regular expressions anytime soon. Given this, pragmatism pushed me in favor of replacing |
I sat on it another day and decided to ahead with it. @Oderjunkie helpfully had a PR already up so I rebased that, updated the version, and squashed it. This should be resolved now by c0ffc3e I still think it is valuable, long term, to achieve the removal of regexs as Erik describes here: #149 (comment). This change is a pragmatic compromise to improve Parsimonious today while there are no alternatives to using regular expressions for some common use cases thanks everyone! |
Many thanks! |
Hello,
While using parsimonious I came across an already-documented bug in the builtin re module, whereby abugidas with vowel marks (that is, most of South Asia and Oceania) fail to match the
\w
directive (e.g., as inre.match("^[\w\s][\w\s]*", "किशोरी", re.UNICODE)
, as taken from this question here). In my particular case, this bug crashes my system dynamics models when I run them in PySD.It seems that the recommended "solution" is to simply used the
regex
instead ofre
. However, this would mean adding a dependency toparsimonious
, so I thought I would ask whether you would look favourably upon such a suggestion before submitting a pull request. I was thinking of proposing something along the lines of:so that nothing breaks if the dependency is not installed.
Please do let me know. Thanks!
-Julien Malard
The text was updated successfully, but these errors were encountered: