Support numeric constraints for Decimal types by cocorigon · Pull Request #692 · msgspec/msgspec · GitHub
Skip to content

Support numeric constraints for Decimal types - #692

Closed
cocorigon wants to merge 2 commits into
msgspec:mainfrom
cocorigon:feat/decimal_constraints
Closed

Support numeric constraints for Decimal types#692
cocorigon wants to merge 2 commits into
msgspec:mainfrom
cocorigon:feat/decimal_constraints

Conversation

@cocorigon

Copy link
Copy Markdown

This is my first time playing around with C, so please feel free to tell me if more micro-optimizations can be achieved. Same for compiler hints, notably for the MS_INLINE and MS_NOINLINE near ms_check_decimal_constraints(...): I implemented it in a manner similar to what was done for floats for example, though I must admit that I did not quite understand the pattern for when to use each.

Also, I added a DevContainer for easier setup for newcomers to the project.

Closes #683.

@Siyet

Siyet commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

@cocorigon

Copy link
Copy Markdown
Author

Hey @Siyet! I don't really do much Python anymore, so no, I will not work on this PR again in the near future.

So feel free to use this code as you wish!

@Siyet

Siyet commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

@Siyet Siyet closed this Apr 10, 2026
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.

Support numeric constraints for Decimal values

2 participants