Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixed DecimalField arbitrary precision support#4075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lovelydinosaur merged 1 commit intoencode:masterfromdvarrazzo:no-decimal-places
Apr 27, 2016

Conversation

@dvarrazzo
Copy link
Contributor

DecimalField has some support for non strict number of decimal places (checking here and there thatdecimal_places is not None but it fails inquantize() with "unsupported operand type(s) for ** or pow(): 'Decimal' and 'NoneType'".

This changeset fixes the problem and allowsDecimalField to handledecimal_places=None. Tests added too.

@jpadillajpadilla added this to the3.3.4 Release milestoneApr 27, 2016
@jpadilla
Copy link
Contributor

@dvarrazzo good stuff, thanks! Anyone else has any objections/comments?

@lovelydinosaurlovelydinosaur merged commit88c80fe intoencode:masterApr 27, 2016
@lovelydinosaur
Copy link
Contributor

Good stuff 👍

@glarrain
Copy link
Contributor

@dvarrazzo@jpadilla@tomchristie isdecimal_places=None allowed then? We should update the docs to make that clear (I volunteer to do so).

On the other hand, why are argsdecimal_places andmax_digits required then? As mentioned by@xordoquyhere, those that are not kwargs to__init__ are supposed to be required (because they can not be set to a default value).

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

3.4.0 Release

Development

Successfully merging this pull request may close these issues.

4 participants

@dvarrazzo@jpadilla@lovelydinosaur@glarrain

[8]ページ先頭

©2009-2025 Movatter.jp