[Tutor] validating decimal class
qsqgeekyogdty at tiscali.co.uk
qsqgeekyogdty at tiscali.co.uk
Thu Nov 6 01:09:44 CET 2008
hello
silly question, but i can't seem to figure it it.
I have an object which is:
>>> type(price)
<class 'decimal.Decimal'>
but i can't figure how to validate against it.
>>>if not isinstance(price, decimal.Decimal):
do something...
how do i ensure that the object 'price' is a decimal?
thanks
______________________________________________________
33% off Norton Security Only From Tiscali - http://www.tiscali.co.uk/securepc/
________________________________________________
More information about the Tutor
mailing list