<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 10, 2013 at 11:56 PM, Stephen J. Turnbull <span dir="ltr"><<a href="mailto:stephen@xemacs.org" target="_blank">stephen@xemacs.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":6p" style="overflow:hidden">I don't see any compelling use case for builtins accepting<br>
any numerical syntax that can't be used in a Python program.</div></blockquote></div><br>TOOWTDI</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">>>> float('٣')</div>
<div class="gmail_extra">3.0</div><div class="gmail_extra"><br></div><div class="gmail_extra" style>Is the more obvious way to extract numeric value than</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>
<div class="gmail_extra">>>> unicodedata.numeric('٣')</div><div class="gmail_extra">3.0</div><div class="gmail_extra"><br></div><div class="gmail_extra" style>> <span style="font-family:arial,sans-serif;font-size:12.666666984558105px">I'd move the current </span><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">builtins to someplace like </span></div>
<div class="gmail_extra" style><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">> unicodedata.parsers.numeric.</span><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">integer_insecure ..</span></div>
<div class="gmail_extra" style><span style="font-family:arial,sans-serif;font-size:12.666666984558105px"><br></span></div><div class="gmail_extra" style><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">That would be an overkill. You can easily write safe code using float(x.encode('ascii')), but if you remove non-ascii digits support from float, there wont be an obvious way to parse non-ascii numerals.</span></div>
<div class="gmail_extra" style><span style="font-family:arial,sans-serif;font-size:12.666666984558105px"><br></span></div><div class="gmail_extra" style><span style="font-family:arial,sans-serif;font-size:12.666666984558105px">I think we can drop support for mixed scripts, though. It is hard to justify accepting input that looks invalid to a human reader or worse is interpreted by humans differently.</span></div>
</div></div></div>