Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
+ 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 ---------- nosy: +belopolsky _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9136> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com