Issue #40806: Support implementation keyword in FiniteField #41203
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.
📝 Checklist
⌛ Dependencies
Closes #40806
Description
This PR addresses Issue #40806 by adding support for the
implementationkeyword argument to theFiniteField(orGF) constructor, treating it as an alias for the existingimplkeyword.The change is implemented in
src/sage/rings/finite_rings/finite_field_constructor.pywithin theFiniteFieldFactory.create_key_and_extra_argsmethod.Changes Made:
implementation=Noneto the function signature.implandimplementation.ValueErrorif both keywords are used simultaneously.implementationis used, its value is assigned toimplto ensure consistency with the existing factory key and implementation logic.Reviewer Checklist:
GF(q, impl='...', implementation='...')raises aValueError.create_key_and_extra_argsto ensure backward compatibility is maintained (i.e., existing uses ofimplstill work).