Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing wrong price in presence of $ #62

Closed
argaurav opened this issue Sep 25, 2023 · 2 comments
Closed

Parsing wrong price in presence of $ #62

argaurav opened this issue Sep 25, 2023 · 2 comments

Comments

@argaurav
Copy link

Hi,

I came across this example:

In [14]: Price.fromstring("2 pairs from $349", decimal_separator=".")
Out[14]: Price(amount=Decimal('2'), currency='$')

given we consider extracting currency as $ would it make sense to handle this case inside price parser?

@argaurav
Copy link
Author

I have seen other examples like


In [15]: Price.fromstring("4 options from $439.34", decimal_separator=".")
Out[15]: Price(amount=Decimal('4'), currency='$')

@Gallaecio
Copy link
Member

#2

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

No branches or pull requests

2 participants