pasystem / python-money

Automatically exported from code.google.com/p/python-money
0 stars 0 forks source link

Division of Money and int results in Decimal instead of Money #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. m = Money(2, "EUR")
2. m * 2 => EUR  4.00, this is correct
3. m / 2 => Decimal('1') this is NOT correct, type should be Money not Decimal

What is the expected output? What do you see instead?

Division of Money to int/float should also be Money (similar to 
multiplication). Instead the result is Decimal

What version of the product are you using? On what operating system?

Bug was discovered in svn version r25

Original issue reported on code.google.com by vior...@gmail.com on 21 Aug 2010 at 4:40

GoogleCodeExporter commented 8 years ago

Original comment by ben.coug...@gmail.com on 14 May 2011 at 3:28

GoogleCodeExporter commented 8 years ago

Original comment by ben.coug...@gmail.com on 14 May 2011 at 4:29

GoogleCodeExporter commented 8 years ago
__div__ now returns a Money instance.

Division by another Money raises an exception.

Original comment by ben.coug...@gmail.com on 14 May 2011 at 4:41