PR #3713 (walrus operator) merged into devel.

18 views
Skip to first unread message

Edward K. Ream

unread,
Dec 15, 2023, 11:13:57 AM12/15/23
to leo-editor
The devel branch now contains PR #3713.

This branch uses the := operator to convert the pattern:

m = <something, usually an regex pattern>
if m:
    <code>

to:

if m := <something, usually an regex pattern>
    <code>

These changes should be safe:

- I converted the code using regex patterns and have carefully reviewed the diffs.

- The legacy and new code bind m in the same way, so (for example) a following "else" clause will always work as before.

- I have been using the code without problems.  All unit tests pass.

Please report any problems :-)

Edward
Reply all
Reply to author
Forward
0 new messages