<div dir="ltr">Yes, this would be a shortcut for that. math.nan and math.inf are less verbose than float("nan") and float("inf"), even if you aren't already using the math module (fewer characters total, and in particular fewer special characters). It would also, at least in my opinion, be more readable. Plus there is already the math.isnan and math.isinf, so I don't think it would be totally out-of-place.<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 7, 2015 at 2:49 PM, Mark Young <span dir="ltr"><<a href="mailto:marky1991@gmail.com" target="_blank">marky1991@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">So with the proposal, you'd likely do something like</div><div class="gmail_extra"><br></div><div class="gmail_extra">from math import nan, inf</div><div class="gmail_extra"><br></div><div class="gmail_extra">Couldn't you just instead put </div><div class="gmail_extra"><br></div><div class="gmail_extra">nan, inf = float("nan"), float("inf")</div><div class="gmail_extra"><br></div><div class="gmail_extra">at the top of your script? I don't really think this is any more verbose than an import from the math module. (Unless you're already doing an import star from math)</div></div>
</blockquote></div><br></div></div></div>