Skip to content

[decimal] Implement as_tuple() method#174

Merged
forfudan merged 2 commits intoclifrom
update
Feb 27, 2026
Merged

[decimal] Implement as_tuple() method#174
forfudan merged 2 commits intoclifrom
update

Conversation

@forfudan
Copy link
Copy Markdown
Owner

@forfudan forfudan commented Feb 27, 2026

Adds a Python-compatible as_tuple() API to BigDecimal and updates docs/tests to reflect recent BigDecimal utility-method additions/removals.

Changes:

  • Implement BigDecimal.as_tuple() returning (sign, digits, exponent) aligned with Python decimal.Decimal.as_tuple().
  • Add a new BigDecimal methods test module including coverage for as_tuple() and other recently added helpers.
  • Update roadmap/README documentation to reflect completed items and version formatting.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a Python-compatible as_tuple() API to BigDecimal and updates docs/tests to reflect recent BigDecimal utility-method additions/removals.

Changes:

  • Implement BigDecimal.as_tuple() returning (sign, digits, exponent) aligned with Python decimal.Decimal.as_tuple().
  • Add a new BigDecimal methods test module including coverage for as_tuple() and other recently added helpers.
  • Update roadmap/README documentation to reflect completed items and version formatting.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
tests/bigdecimal/test_bigdecimal_methods.mojo New tests for utility methods; adds as_tuple() round-trip checks.
src/decimo/bigdecimal/bigdecimal.mojo Implements as_tuple() and removes number_of_significant_digits().
docs/plans/api_roadmap.md Marks as_tuple() and other items as done; updates wording/status markers.
README.md Adjusts version strings in the compatibility table (adds v prefix).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/decimo/bigdecimal/bigdecimal.mojo
Comment thread docs/plans/api_roadmap.md Outdated
Comment thread tests/bigdecimal/test_bigdecimal_methods.mojo
Comment thread tests/bigdecimal/test_bigdecimal_methods.mojo
Comment thread tests/bigdecimal/test_bigdecimal_methods.mojo
@forfudan forfudan merged commit 4d3a9f4 into cli Feb 27, 2026
1 check passed
@forfudan forfudan deleted the update branch February 27, 2026 23:43
forfudan added a commit that referenced this pull request Mar 23, 2026
Adds a Python-compatible `as_tuple()` API to `BigDecimal` and updates docs/tests to reflect recent BigDecimal utility-method additions/removals.

**Changes:**
- Implement `BigDecimal.as_tuple()` returning `(sign, digits, exponent)` aligned with Python `decimal.Decimal.as_tuple()`.
- Add a new BigDecimal methods test module including coverage for `as_tuple()` and other recently added helpers.
- Update roadmap/README documentation to reflect completed items and version formatting.
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.

2 participants