Skip to content

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

Open
jeff5 wants to merge 3 commits into
jython:masterfrom
jeff5:fix-356-ast-list-add
Open

Fix bug in AstList add (fixes #356)#423
jeff5 wants to merge 3 commits into
jython:masterfrom
jeff5:fix-356-ast-list-add

Conversation

@jeff5
Copy link
Copy Markdown
Member

@jeff5 jeff5 commented Apr 23, 2026

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
Copy link
Copy Markdown
Member Author

jeff5 commented Apr 24, 2026

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
Copy link
Copy Markdown
Member Author

jeff5 commented Apr 25, 2026

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
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