Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45699

RE: PEP 378: Format Specifier for Thousands Separator

From Carlos Nepomuceno <carlosnepomuceno@outlook.com>
Subject RE: PEP 378: Format Specifier for Thousands Separator
Date 2013-05-22 05:56 +0300
References <knghok$3bd$1@ger.gmane.org> <519c30b0$0$6599$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.1946.1369191420.3114.python-list@python.org> (permalink)

Show all headers | View raw


----------------------------------------
> From: steve+comp.lang.python@pearwood.info
> Subject: Re: PEP 378: Format Specifier for Thousands Separator
> Date: Wed, 22 May 2013 02:42:56 +0000
> To: python-list@python.org
>
> On Tue, 21 May 2013 23:22:24 +0300, Carlos Nepomuceno wrote:
>
>> Anyway, is it possible to overload str.__mod__() without deriving a
>> class? I mean to have something like:
>
> No, not in Python. If you want to monkey-patch built-in classes on the
> fly, with all the troubles that causes, use Ruby.
>

So, the only alternative to have "'%,d' % x" rendering the thousands separator output would a C source code modification?

> --
> Steven
> --
> http://mail.python.org/mailman/listinfo/python-list 		 	   		  

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

RE: PEP 378: Format Specifier for Thousands Separator Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-21 23:22 +0300
  Re: PEP 378: Format Specifier for Thousands Separator Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-22 02:42 +0000
    RE: PEP 378: Format Specifier for Thousands Separator Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-22 05:56 +0300
      Re: PEP 378: Format Specifier for Thousands Separator Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-22 03:08 +0000
        RE: PEP 378: Format Specifier for Thousands Separator Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-22 06:38 +0300
          Re: PEP 378: Format Specifier for Thousands Separator 88888 Dihedral <dihedral88888@gmail.com> - 2013-05-22 00:14 -0700
        Re: PEP 378: Format Specifier for Thousands Separator Ned Batchelder <ned@nedbatchelder.com> - 2013-05-22 07:25 -0400
        RE: PEP 378: Format Specifier for Thousands Separator Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-22 14:52 +0300

csiph-web