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 belopolsky
Recipients belopolsky, ezio.melotti, mark.dickinson, rhettinger, skrah, ubershmekel
Date 2010-07-05.01:36:05
SpamBayes Score 0.012856419
Marked as misclassified No
Message-id <1278293768.13.0.305463214209.issue9136@psf.upfronthosting.co.za>
In-reply-to
Content
+        try:
+            dc = DefaultContext
+        except NameError:
+            pass
+
+        self.prec = dc.prec if prec is None else prec

I don't quite understand the point of catching NameError here, but it looks like if it is caught, it will just be raised by the next line because dc will not be set.

Also, I am not sure ternary expressions are a big readability win here, but if you want to keep them, consider 

self.prec = prec if prec is not None else dc.prec
History
Date User Action Args
2010-07-05 01:36:08belopolskysetrecipients: + belopolsky, rhettinger, mark.dickinson, ezio.melotti, ubershmekel, skrah
2010-07-05 01:36:08belopolskysetmessageid: <1278293768.13.0.305463214209.issue9136@psf.upfronthosting.co.za>
2010-07-05 01:36:06belopolskylinkissue9136 messages
2010-07-05 01:36:05belopolskycreate