Skip to content

Fix bug in AstList add (fixes #356)#423

Merged
jeff5 merged 4 commits into
jython:masterfrom
jeff5:fix-356-ast-list-add
May 19, 2026
Merged

Fix bug in AstList add (fixes #356)#423
jeff5 merged 4 commits into
jython:masterfrom
jeff5:fix-356-ast-list-add

Conversation

@jeff5

@jeff5 jeff5 commented Apr 23, 2026

Copy link
Copy Markdown
Member

The first material change fixes the bug reported in #356, but there are others in AstList that prevent it behaving as a Python list. (Try slice assignment.) Maybe we should fix those too.

Generally, I'm puzzled why this isn't just a PyList.

jeff5 added 2 commits April 23, 2026 20:56
We do this first so that the material change is evident.
@jeff5 jeff5 marked this pull request as draft April 24, 2026 07:08
@jeff5

jeff5 commented Apr 24, 2026

Copy link
Copy Markdown
Member Author

I see why we do not simply use a PyList: it is to accommodate additional fields including the adaptor that polices the type of content (a clever idea). I don't see why it couldn't get more of its implementation from PyList, however, and therefore benefit from the correctness enforced by tests.

@jeff5

jeff5 commented Apr 25, 2026

Copy link
Copy Markdown
Member Author

There are other problems in the affected code (see #356 (comment)), but I don't propose to fix them in this PR.

@jeff5 jeff5 marked this pull request as ready for review April 25, 2026 10:55
@jeff5 jeff5 merged commit 0b1cf6b into jython:master May 19, 2026
8 checks passed
@jeff5 jeff5 deleted the fix-356-ast-list-add branch May 19, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant