Skip to content

Conversation

JelleZijlstra
Copy link
Contributor

No description provided.

return _check_generic_container(
"list.append", "object", ctx.vars["self"], lst, element, ctx, list
)
if isinstance(lst, GenericValue):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could alternatively be elif, which would allow us to append anything to a SequenceValue (i.e., unannotated) list. But I just ran this branch internally and only got three errors, all of which were fixable by adding explicit annotations. I think such annotations are helpful, so I'll stick with this logic.

@JelleZijlstra JelleZijlstra merged commit 5080a78 into master Apr 14, 2022
@JelleZijlstra JelleZijlstra deleted the listappend branch April 14, 2022 19:32
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