Skip to content

Conversation

ryangallen
Copy link

Set IntegerField class variable for compiled decimal regex, comment for purpose

@lovelydinosaur
Copy link
Contributor

Great, thanks! :)

@ryangallen
Copy link
Author

Of course, happy to help. Thanks for the feedback.

lovelydinosaur added a commit that referenced this pull request Apr 21, 2015
Set IntegerField class variable for compiled decimal regex, comment for ...
@lovelydinosaur lovelydinosaur merged commit 0ca1145 into encode:master Apr 21, 2015
@lovelydinosaur lovelydinosaur added this to the 3.1.2 Release milestone Apr 21, 2015
@ryangallen
Copy link
Author

Tom, I just realized the test valid_inputs and outputs in the test don't match. '1.0' is not tested for output. Should the output values be coerced the same way as the input?

def to_representation(self, value):
    return int(self.re_decimal.sub('', str(value)))

Pull: #2870

@lovelydinosaur
Copy link
Contributor

Should the output values be coerced the same way as the input?

I think we should probably pass on that - don't really want to run ever single integer we output through that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants