This adds `_`, `case` and `match` to the Python keywords list.
`_` seems not very useful but also won't hurt I guess. It will be highlighted as keyword when used in something like `message = _('Text to be translated')`, while not completely technically correct in this case, it is OK IMO and not worth the efforts to remove this single keyword from the list in the update script.
N.B.: the `scripts/update-python-identifiers.sh` script now requires Python 3.10 which was released about one year ago and the script is only to be executed by developers.
Closes #3263.
Before: ![issue3263_before](https://user-images.githubusercontent.com/617017/188320292-8565106a-bded-461...)
After: ![issue3263_after](https://user-images.githubusercontent.com/617017/188320298-f85d2dc4-0721-438...)
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3277
-- Commit Summary --
* Add soft keywords to Python keyword list
-- File Changes --
M data/filedefs/filetypes.python.in (4) M scripts/update-python-identifiers.sh (4)
-- Patch Links --
https://github.com/geany/geany/pull/3277.patch https://github.com/geany/geany/pull/3277.diff
Looks ok to me, the Python experts seem to be in agreement that this should be done so ok.
Committ message should also mention "... and update to Python 3.10" since it also removed `__peg_parser__` and added to identifiers as well as adding `match` and `case`.
Looks ok to me, the Python experts seem to be in agreement that this should be done so ok.
Committ message should also mention "... and update to Python 3.10" since it also removed `__peg_parser__` and added to identifiers as well as adding `match` and `case`.
Thanks, done.
If there won't be objections, I'll merge this in a few days.
Merged #3277 into master.
github-comments@lists.geany.org