Testing Equality of boto Price object
Question: I am using the python package boto to connect python to MTurk. I am needing to
award bonus payments, which are of the Price type. I want to test if one Price
object equals a certain value. Specifically, when I want to award bonus
payments, I need to check that their bonus payment is not 0 (because when you
try to award a bonus payment in MTurk, it needs to be positive). But when I go
to check values, I can't do this. For example,

    
    
    from boto.mturk.connection import MTurkConnection
    from boto.mturk.price import Price
    a = Price(0)
    a == 0
    a == Price(0)
    a == Price(0.0)
    a > Price(0)
    a < Price(0)
    c = Price(.05)
    c < Price(0)
    c < Price(0.0)
    

These yield unexpected answers.

I am not sure of how to test if a has a Price equal to 0. Any suggestions?


Answer: Think you'll want the Price.amount function to compare these values.
Otherwise, I think it compares objects or some other goofiness. It'd be smart
for the library to override the standard quality test to make this more
developer-friendly.

