You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Distinguish between "pre-move" and "post-move" comments in GameNode #1171
I am working with a data source that explicitly distinguishes between two types of comments for a specific move:
Before the move (e.g., context or instructions given before the move is made).
After the move (e.g., analysis or annotation of the move itself).
Currently, chess.pgn.GameNode seems to only support a single comment attribute.
If I have a sequence like: {Comment Before} 1. e4 {Comment After}
I am forced to append {Comment Before} to the parent.comment (the previous node) and {Comment After} to the current node.comment. While this produces valid PGN text, it causes semantic issues in the object model:
If I iterate through the game nodes later, the "Comment Before" is logically attached to the previous move, not the current one.
It becomes difficult to parse the PGN back and separate which part of the text was intended as a "pre-move" note vs a "post-move" annotation.
Feature Request:
Would it be possible to introduce a mechanism to store pre-move comments separately?
For example, adding a pre_comment attribute to GameNode or ensuring that the Visitor can distinguish between comments appearing before the move token/SAN and comments appearing after it.
This would greatly help in preserving the structure of the original data.
Activity