Repository navigation
Format: accept a named pattern or a blank as the argument, e.g. Format[t_h] := ... - #1997
Merged
Merged
Conversation
…t[t_h] := ... eval_assign_format replaced the left-hand side by its head, so for Format[A_G] := ... the tag became Pattern and the assignment failed with "Tag Pattern in A_G is Protected". Keep named patterns and blanks as they are, so the tag (G) is found inside them, as for other assignments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
LGTM |
Member
|
@mmatera I am guessing then you have no problem with accepting Claude Code commits, right? |
Contributor
As I just said in #1991 (comment), in principle I am OK with it, as far as it does not flood our review capacity. |
Member
To me, the sad part is that there really is this much wrong with the code. I will be focusing right now on going over the PRs. So far, everything I've seen makes sense and is good. |
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
eval_assign_formatreplaced the left-hand side of aFormatdefinition by its head before looking for the tag. For a named pattern or a blank the head isPatternorBlank, so the assignment failed:In WMA this defines a format for
G;Format[_G]andFormat[t:G[__]]work the same way.This PR keeps named patterns and blanks as they are, so the tag (
G) is found inside them bycollect_lhs_names_and_upset_dont_allow_custom, as for other assignments. Related: #898.Tests: new cases in
test/builtin/assignments/test_assignment.py(test_assignment).🤖 Generated with Claude Code