Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #94143
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.014 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'bug.': 0.07; 'though:': 0.07; 'type,': 0.07; 'valueerror:': 0.07; 'cc:addr:python-list': 0.09; 'literal': 0.09; 'subject:2.7': 0.09; 'supported.': 0.09; 'python': 0.10; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'numeral': 0.16; 'subject:non': 0.16; 'wrote:': 0.16; 'string': 0.17; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; '"",': 0.22; 'fraction': 0.22; 'seems': 0.23; '(most': 0.24; 'tim': 0.24; 'header:In-Reply-To:1': 0.24; 'feature': 0.24; 'linux': 0.26; 'message- id:@mail.gmail.com': 0.27; 'character.': 0.29; 'chase': 0.29; 'decimal': 0.29; 'request,': 0.29; 'subject: [': 0.29; 'convert': 0.29; "i'm": 0.30; 'agreed': 0.31; 'traceback': 0.33; 'definition': 0.34; 'file': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'unicode': 0.35; 'but': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'no,': 0.38; 'wrong': 0.38; 'anything': 0.38; 'skip:p 20': 0.38; 'subject:-': 0.39; 'some': 0.40; 'ten': 0.60; 'your': 0.60; 'more': 0.63; "they're": 0.66; 'float:': 0.72; 'jul': 0.72; 'category.': 0.84; 'chrisa': 0.84; 'holes': 0.84; "it'd": 0.84; 'numerals': 0.84; 'roman': 0.84; 'to:none': 0.91; '2014,': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=C2E23DU3ilmpgVwulOAGwwW0D9lsQgo+doP9DYOr/YM=; b=UEP2FIg2cVPPKe7Q2PyH3WTIQdC9uqcfeac6O41Ppn0egvM1cohBF3d1bbA7+T6Nvu RPW0cwQgTTclqqXxwj4BWa/TxJ7M+GffV3m5+5yyXN5k+Cc4O1qRPpYk7TUkzyrM10h8 bdxd92QQytMbqbbX6r181c7MG1I53GwJom5m8gnvFtm/ce4ka+O8ZSofroXgTwym77hn Rlwct71gNOfkZW2nBEVb/Jwx4Wp5oMDaXA1CK8PpHimN8EzeSB0844DvTHda4kvbRpr+ gu6VjZXirDQMP2pLx5b+XsovpbEgnPtpWd+iYDVwEZ6CDJJTJfWz/6m+I/ZGgNV2TCdm YLDw== |
| MIME-Version | 1.0 |
| X-Received | by 10.107.4.1 with SMTP id 1mr28377188ioe.10.1437329278510; Sun, 19 Jul 2015 11:07:58 -0700 (PDT) |
| In-Reply-To | <20150719075601.779a4edb@bigbox.christie.dr> |
| References | <moenuj$f11$1@ger.gmane.org> <moeqtn$mh0$1@ger.gmane.org> <moeurf$a6f$1@ger.gmane.org> <mailman.695.1437273248.3674.python-list@python.org> <7083e494-6192-4acb-aea9-216d858171bc@googlegroups.com> <55ab2b57$0$1664$c3e8da3$5496439d@news.astraweb.com> <20150719075601.779a4edb@bigbox.christie.dr> |
| Date | Mon, 20 Jul 2015 04:07:58 +1000 |
| Subject | Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.732.1437329281.3674.python-list@python.org> (permalink) |
| Lines | 39 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1437329281 news.xs4all.nl 2869 [2001:888:2000:d::a6]:50298 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:94143 |
Show key headers only | View raw
On Sun, Jul 19, 2015 at 10:56 PM, Tim Chase
<python.list@tim.thechases.com> wrote:
> Agreed that it's pretty awesome. It seems to have some holes though:
>
> Python 3.4.2 (default, Oct 8 2014, 10:45:20)
> [GCC 4.9.1] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> print('\N{VULGAR FRACTION ONE EIGHTH}')
> ⅛
>>>> print(float('\N{VULGAR FRACTION ONE EIGHTH}'))
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ValueError: could not convert string to float: '⅛'
>>>> print('\N{ROMAN NUMERAL NINE}')
> Ⅸ
>>>> int('\N{ROMAN NUMERAL NINE}')
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ValueError: invalid literal for int() with base 10: 'Ⅸ'
>>>> print('\N{ROMAN NUMERAL TEN THOUSAND}')
> ↂ
>>>> int('\N{ROMAN NUMERAL TEN THOUSAND}')
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ValueError: invalid literal for int() with base 10: 'ↂ'
The int() and float() functions accept, if I'm not mistaken, anything
with Unicode category "Nd" (Number, decimal digit). In your examples,
the fraction (U+215B) is No, and the Roman numerals (U+2168, U+2182)
are Nl, so they're not supported. Adding support for these forms might
be accepted as a feature request, but it's not a bug.
(I may be wrong about the definition being based on category. It may
be based on the "Numeric type" of each character. But again, the
characters that are accepted would be those which have a Digit type,
not merely Numeric, and again, it'd be a feature request to expand
that.)
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Should non-security 2.7 bugs be fixed? Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-07-18 19:33 -0700
Re: Should non-security 2.7 bugs be fixed? Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-18 19:49 -0700
Re: Should non-security 2.7 bugs be fixed? Rustom Mody <rustompmody@gmail.com> - 2015-07-18 20:52 -0700
Re: Should non-security 2.7 bugs be fixed? Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-18 21:18 -0700
Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Steven D'Aprano <steve@pearwood.info> - 2015-07-19 14:45 +1000
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Chris Angelico <rosuav@gmail.com> - 2015-07-19 15:06 +1000
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Marko Rauhamaa <marko@pacujo.net> - 2015-07-19 10:16 +0300
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-19 00:32 -0700
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Marko Rauhamaa <marko@pacujo.net> - 2015-07-19 10:44 +0300
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Terry Reedy <tjreedy@udel.edu> - 2015-07-19 19:13 -0400
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-19 19:02 -0700
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Anuradha Laxminarayan <lanuradha@gmail.com> - 2015-07-18 23:25 -0700
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Terry Reedy <tjreedy@udel.edu> - 2015-07-19 04:26 -0400
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Tim Chase <python.list@tim.thechases.com> - 2015-07-19 07:56 -0500
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Chris Angelico <rosuav@gmail.com> - 2015-07-20 04:07 +1000
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Tim Chase <python.list@tim.thechases.com> - 2015-07-19 14:55 -0500
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Chris Angelico <rosuav@gmail.com> - 2015-07-20 07:16 +1000
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] wxjmfauth@gmail.com - 2015-07-20 00:43 -0700
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] MRAB <python@mrabarnett.plus.com> - 2015-07-19 23:13 +0100
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-20 20:30 -0700
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Chris Angelico <rosuav@gmail.com> - 2015-07-21 13:43 +1000
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-20 23:11 -0700
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Laura Creighton <lac@openend.se> - 2015-07-21 10:10 +0200
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Marko Rauhamaa <marko@pacujo.net> - 2015-07-21 12:10 +0300
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Chris Angelico <rosuav@gmail.com> - 2015-07-21 19:18 +1000
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Marko Rauhamaa <marko@pacujo.net> - 2015-07-21 13:13 +0300
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-21 11:34 +0100
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-07-21 20:39 +1000
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Marko Rauhamaa <marko@pacujo.net> - 2015-07-21 13:54 +0300
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Marko Rauhamaa <marko@pacujo.net> - 2015-08-09 00:27 +0300
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-08-09 09:29 -0700
Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-22 06:34 -0700
OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Steven D'Aprano <steve@pearwood.info> - 2015-07-23 02:58 +1000
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Laura Creighton <lac@openend.se> - 2015-07-22 19:17 +0200
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-22 10:49 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Laura Creighton <lac@openend.se> - 2015-07-22 20:14 +0200
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-22 21:59 +0100
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Steven D'Aprano <steve@pearwood.info> - 2015-07-23 03:21 +1000
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-07-22 21:44 -0400
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Chris Angelico <rosuav@gmail.com> - 2015-07-23 12:00 +1000
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Paul Rubin <no.email@nospam.invalid> - 2015-07-22 10:48 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-22 10:51 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-07-23 15:14 +1000
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-22 11:09 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-07-23 15:41 +1000
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Marko Rauhamaa <marko@pacujo.net> - 2015-07-23 23:59 +0300
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Chris Angelico <rosuav@gmail.com> - 2015-07-24 07:03 +1000
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Marko Rauhamaa <marko@pacujo.net> - 2015-07-24 00:29 +0300
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-23 22:50 +0100
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Laura Creighton <lac@openend.se> - 2015-07-23 23:52 +0200
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Marko Rauhamaa <marko@pacujo.net> - 2015-07-24 00:59 +0300
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Chris Angelico <rosuav@gmail.com> - 2015-07-24 08:02 +1000
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Chris Angelico <rosuav@gmail.com> - 2015-07-24 08:00 +1000
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] MRAB <python@mrabarnett.plus.com> - 2015-07-23 23:01 +0100
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Laura Creighton <lac@openend.se> - 2015-07-24 00:19 +0200
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-23 23:56 +0100
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Grant Edwards <invalid@invalid.invalid> - 2015-07-24 00:07 +0000
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-23 18:40 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Paul Rubin <no.email@nospam.invalid> - 2015-07-23 19:03 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-23 20:16 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Grant Edwards <invalid@invalid.invalid> - 2015-07-24 14:13 +0000
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Paul Rubin <no.email@nospam.invalid> - 2015-07-24 08:45 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-24 16:58 +0100
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-23 22:15 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-07-23 18:57 +1200
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-23 02:12 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Rustom Mody <rustompmody@gmail.com> - 2015-07-23 05:52 -0700
Re: OT Re: Math-embarrassment results in CS [was: Should non-security 2.7 bugs be fixed?] Marko Rauhamaa <marko@pacujo.net> - 2015-07-23 11:24 +0300
Re: Devanagari int literals [was Re: Should non-security 2.7 bugs be fixed?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-07-21 18:57 +1000
Re: Should non-security 2.7 bugs be fixed? Terry Reedy <tjreedy@udel.edu> - 2015-07-19 02:44 -0400
Re: Should non-security 2.7 bugs be fixed? Terry Reedy <tjreedy@udel.edu> - 2015-07-19 05:11 -0400
Re: Should non-security 2.7 bugs be fixed? Rustom Mody <rustompmody@gmail.com> - 2015-07-19 07:30 -0700
Re: Should non-security 2.7 bugs be fixed? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-19 15:00 +0100
Re: Should non-security 2.7 bugs be fixed? Steven D'Aprano <steve@pearwood.info> - 2015-07-19 14:45 +1000
Re: Should non-security 2.7 bugs be fixed? Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-07-19 18:20 -0700
Re: Should non-security 2.7 bugs be fixed? Steven D'Aprano <steve@pearwood.info> - 2015-07-20 13:05 +1000
Re: Should non-security 2.7 bugs be fixed? Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-07-19 20:41 -0700
Re: Should non-security 2.7 bugs be fixed? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-20 02:46 +0100
Re: Should non-security 2.7 bugs be fixed? Rustom Mody <rustompmody@gmail.com> - 2015-07-19 19:16 -0700
Re: Should non-security 2.7 bugs be fixed? Chris Angelico <rosuav@gmail.com> - 2015-07-20 12:59 +1000
Re: Should non-security 2.7 bugs be fixed? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-20 11:59 +0100
Re: Should non-security 2.7 bugs be fixed? Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-20 20:04 -0700
Re: Should non-security 2.7 bugs be fixed? Rustom Mody <rustompmody@gmail.com> - 2015-07-20 20:15 -0700
Re: Should non-security 2.7 bugs be fixed? Chris Angelico <rosuav@gmail.com> - 2015-07-21 13:33 +1000
Re: Should non-security 2.7 bugs be fixed? Terry Reedy <tjreedy@udel.edu> - 2015-07-21 00:45 -0400
Re: Should non-security 2.7 bugs be fixed? breamoreboy@gmail.com - 2015-07-21 14:22 -0700
Re: Should non-security 2.7 bugs be fixed? Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-21 19:07 -0700
Re: Should non-security 2.7 bugs be fixed? Terry Reedy <tjreedy@udel.edu> - 2015-07-22 02:51 -0400
Re: Should non-security 2.7 bugs be fixed? Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-22 16:37 -0700
Re: Should non-security 2.7 bugs be fixed? Terry Reedy <tjreedy@udel.edu> - 2015-07-20 02:25 -0400
Re: Should non-security 2.7 bugs be fixed? dieter <dieter@handshake.de> - 2015-07-20 08:58 +0200
Re: Should non-security 2.7 bugs be fixed? Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-07-20 00:13 -0700
csiph-web