This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients facundobatista, mark.dickinson, rhettinger, skrah
Date 2009-09-07.15:27:56
SpamBayes Score 0.00044153768
Marked as misclassified No
Message-id <20090907172735.GA4483@mail.bytereef.org>
In-reply-to <1251469621.38.0.248001245965.issue6795@psf.upfronthosting.co.za>
Content
[...]
> But in Python this error condition *can* 'otherwise be indicated', by 
> raising a suitable Python exception.  So I propose changing the decimal 
> module in 2.7 and 3.2 so that int(Decimal('nan')) and 
> long(Decimal('nan')) raise ValueError.

Excellent analysis, I would be very much in favour of this.

> Issue 3. I can't see how this could cause any real problems, since you'd 
> get an error as soon as you tried to use a bogus context.  Further, an 
> explicit typecheck goes against Python's duck-typing philosophy:  a 
> suitably crazy and misguided person ought to be able to create their own 
> 'quacks like a context' class, not necessarily inheriting from 
> Decimal.Context, and pass this into setcontext in place of a real 
> context.  I'm -0 on changing this.

Agreed, it's not really important.
History
Date User Action Args
2009-09-07 15:27:58skrahsetrecipients: + skrah, rhettinger, facundobatista, mark.dickinson
2009-09-07 15:27:56skrahlinkissue6795 messages
2009-09-07 15:27:56skrahcreate