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


Groups > comp.lang.python > #17258

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'operator': 0.04; 'term,': 0.07; 'modifies': 0.09; 'modulo': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'underlying': 0.09; 'binary': 0.13; 'mathematics': 0.13; 'subject:was': 0.15; '*do*': 0.16; 'blanket': 0.16; 'enigma': 0.16; 'equation.': 0.16; 'extracting': 0.16; 'kern': 0.16; 'operator.': 0.16; 'operator;': 0.16; 'subject: \n ': 0.16; 'subject:syntax': 0.16; 'wed,': 0.17; 'language': 0.17; 'wrote:': 0.18; 'programming': 0.21; 'subject:not': 0.21; "aren't": 0.21; 'maybe': 0.21; 'dec': 0.22; '(or': 0.22; 'header :In-Reply-To:1': 0.22; "python's": 0.24; 'saying': 0.26; "i'm": 0.26; 'function': 0.27; 'not.': 0.28; 'interpret': 0.29; 'looks': 0.29; 'problem': 0.29; 'second': 0.29; 'pm,': 0.29; '"in': 0.30; '+0200,': 0.30; 'arithmetic': 0.30; 'really,': 0.30; 'equivalent': 0.31; "didn't": 0.31; 'programmers': 0.32; 'subject:]': 0.32; 'header:User-Agent:1': 0.33; 'header:X-Complaints-To:1': 0.33; 'that,': 0.33; 'there': 0.33; 'to:addr:python-list': 0.34; 'mostly': 0.34; 'fault': 0.34; 'symbol': 0.34; 'something': 0.35; 'example,': 0.37; 'two': 0.37; 'but': 0.37; "there's": 0.37; 'think': 0.37; 'enough': 0.38; 'using': 0.38; 'steven': 0.38; 'received:org': 0.38; 'abuse': 0.39; 'should': 0.39; "couldn't": 0.39; 'define': 0.39; "it's": 0.40; 'to:addr:python.org': 0.40; 'difference': 0.40; 'more': 0.61; '2011': 0.61; 'world': 0.62; 'our': 0.64; 'believe': 0.65; 'making': 0.67; 'designers': 0.67; 'special': 0.68; 'challenge': 0.68; 'received:109': 0.78; '12:32': 0.84; 'eco': 0.91; 'relations.': 0.91; 'that),': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Robert Kern <robert.kern@gmail.com>
Subject Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]
Date Thu, 15 Dec 2011 10:47:49 +0000
References <mailman.3520.1323647085.27778.python-list@python.org> <qotborenjie.fsf@ruuvi.it.helsinki.fi> <mailman.3549.1323704712.27778.python-list@python.org> <qot8vmhn34u.fsf@ruuvi.it.helsinki.fi> <a5c77779-be8e-42ad-a652-01c594235683@y7g2000vbe.googlegroups.com> <4ee81592$0$11091$c3e8da3@news.astraweb.com> <qotipljcz19.fsf@ruuvi.it.helsinki.fi> <4ee89762$0$29979$c3e8da3$5496439d@news.astraweb.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host host109-153-163-100.range109-153.btcentralplus.com
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0
In-Reply-To <4ee89762$0$29979$c3e8da3$5496439d@news.astraweb.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3666.1323946085.27778.python-list@python.org> (permalink)
Lines 48
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1323946085 news.xs4all.nl 6914 [2001:888:2000:d::a6]:40470
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:17258

Show key headers only | View raw


On 12/14/11 12:32 PM, Steven D'Aprano wrote:
> On Wed, 14 Dec 2011 10:56:02 +0200, Jussi Piitulainen wrote:

>> I'm not misunderstanding any argument. There was no argument. There was
>> a blanket pronouncement that _in mathematics_ mod is not a binary
>> operator. I should learn to challenge such pronouncements and ask what
>> the problem is. Maybe next time.
>
> So this was *one* person making that claim?
>
> I understand that, in general, mathematicians don't have much need for a
> remainder function in the same way programmers do -- modulo arithmetic is
> far more important. But there's a world of difference between saying "In
> mathematics, extracting the remainder is not important enough to be given
> a special symbol and treated as an operator" and saying "remainder is not
> a binary operator". The first is reasonable; the second is not.

The professional mathematicians that I know personally don't say that "remainder 
is not a binary operator". They *do* say that "modulo is not an operator" in 
mathematics just because they have reserved that word and the corresponding 
notation to define the congruence relations. So for example, the following two 
statements are equivalent:

   42 = 2 mod 5
   2 = 42 mod 5

The "mod 5" notation modifies the entire equation (or perhaps the = sign if you 
like to think about it like that), not the term it is immediately next to. 
Python's % operator is a binary operator that binds to a particular term, not 
the whole equation. The following two are not equivalent statements:

   42 == 2 % 5
   2 == 42 % 5

It's mostly kvetching on their part that programming language designers 
misunderstood the notation and applied the name to something that is confusingly 
almost, but not quite, the same thing. They aren't saying that you couldn't 
*define* such an operator; they would just prefer that we didn't abuse the name. 
But really, it's their fault for using notation that looks like an operator.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

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


Thread

Verbose and flexible args and kwargs syntax Eelco Hoogendoorn <hoogendoorn.eelco@gmail.com> - 2011-12-12 00:44 +0100
  Re: Verbose and flexible args and kwargs syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-12 01:11 +0000
    Re: Verbose and flexible args and kwargs syntax Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-12-12 21:09 +1300
      Re: Verbose and flexible args and kwargs syntax Terry Reedy <tjreedy@udel.edu> - 2011-12-12 10:36 -0500
      Re: Verbose and flexible args and kwargs syntax Nick Dokos <nicholas.dokos@hp.com> - 2011-12-12 10:55 -0500
      Re: Verbose and flexible args and kwargs syntax Arnaud Delobelle <arnodel@gmail.com> - 2011-12-12 16:15 +0000
      Re: Verbose and flexible args and kwargs syntax Chris Angelico <rosuav@gmail.com> - 2011-12-13 03:16 +1100
      Re: Verbose and flexible args and kwargs syntax Chris Angelico <rosuav@gmail.com> - 2011-12-13 03:19 +1100
    Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-12 04:21 -0800
      Re: Verbose and flexible args and kwargs syntax Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-12 11:09 -0700
        Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-12 10:17 -0800
          Re: Verbose and flexible args and kwargs syntax Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-12 11:35 -0700
            Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-12 10:51 -0800
              Re: Verbose and flexible args and kwargs syntax Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-12 17:34 -0700
                Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-13 00:31 -0800
            Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-12 11:05 -0800
              Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-12 11:20 -0800
      Re: Verbose and flexible args and kwargs syntax alex23 <wuwei23@gmail.com> - 2011-12-12 15:54 -0800
      Re: Verbose and flexible args and kwargs syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-13 02:43 +0000
        Re: Verbose and flexible args and kwargs syntax Chris Angelico <rosuav@gmail.com> - 2011-12-13 14:08 +1100
        Re: Verbose and flexible args and kwargs syntax Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-12 21:52 -0700
        Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-13 01:15 -0800
          Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-13 01:50 -0800
            Re: Verbose and flexible args and kwargs syntax Arnaud Delobelle <arnodel@gmail.com> - 2011-12-13 10:15 +0000
              Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-13 02:39 -0800
              Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-13 02:46 -0800
                Re: Verbose and flexible args and kwargs syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-13 11:28 +0000
                Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-13 04:19 -0800
          Re: Verbose and flexible args and kwargs syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-13 11:13 +0000
            Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-13 04:47 -0800
              Re: Verbose and flexible args and kwargs syntax Chris Angelico <rosuav@gmail.com> - 2011-12-14 00:14 +1100
                Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-13 05:35 -0800
    Re: Verbose and flexible args and kwargs syntax "OKB (not okblacke)" <brenNOSPAMbarn@NObrenSPAMbarn.net> - 2011-12-12 19:45 +0000
  Re: Verbose and flexible args and kwargs syntax Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-12-12 12:59 +0200
    Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-12 03:22 -0800
      Re: Verbose and flexible args and kwargs syntax Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-12-12 13:46 +0200
    Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-12 03:18 -0800
    Re: Verbose and flexible args and kwargs syntax Terry Reedy <tjreedy@udel.edu> - 2011-12-12 10:39 -0500
      Re: Verbose and flexible args and kwargs syntax Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-12-12 18:52 +0200
        Re: Verbose and flexible args and kwargs syntax Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-12 09:29 -0800
          Re: Verbose and flexible args and kwargs syntax Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-12-12 20:09 +0200
          % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-14 03:18 +0000
            Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-13 23:49 -0800
              Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Arnaud Delobelle <arnodel@gmail.com> - 2011-12-14 11:55 +0000
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-14 04:33 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Arnaud Delobelle <arnodel@gmail.com> - 2011-12-14 16:13 +0000
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-14 09:15 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] rusi <rustompmody@gmail.com> - 2011-12-14 19:43 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-15 01:44 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] rusi <rustompmody@gmail.com> - 2011-12-15 02:56 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-15 03:37 -0800
            Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-12-14 10:56 +0200
              Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-14 02:09 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-12-14 14:22 +0200
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-14 04:41 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-14 12:38 +0000
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-14 05:29 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Chris Angelico <rosuav@gmail.com> - 2011-12-15 00:39 +1100
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-14 08:45 -0700
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Terry Reedy <tjreedy@udel.edu> - 2011-12-14 15:57 -0500
              Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] rusi <rustompmody@gmail.com> - 2011-12-14 03:47 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Chris Angelico <rosuav@gmail.com> - 2011-12-14 22:53 +1100
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-12-14 15:09 +0200
              Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-14 12:32 +0000
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-12-14 15:21 +0200
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Robert Kern <robert.kern@gmail.com> - 2011-12-15 10:47 +0000
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-15 02:59 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] alex23 <wuwei23@gmail.com> - 2011-12-15 18:14 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] MRAB <python@mrabarnett.plus.com> - 2011-12-16 02:58 +0000
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-16 02:36 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Chris Angelico <rosuav@gmail.com> - 2011-12-16 16:01 +1100
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] alex23 <wuwei23@gmail.com> - 2011-12-15 21:30 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-16 02:25 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] rusi <rustompmody@gmail.com> - 2011-12-16 09:38 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-16 11:40 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and   kwargs syntax] Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-12-17 12:49 +1300
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Eelco <hoogendoorn.eelco@gmail.com> - 2011-12-16 16:00 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Roy Smith <roy@panix.com> - 2011-12-16 19:03 -0500
                Re: % is not an operator [was Re: Verbose and flexible args and   kwargs syntax] Grant Edwards <invalid@invalid.invalid> - 2011-12-17 20:02 +0000
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-17 00:54 +0000
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] David Robinow <drobinow@gmail.com> - 2011-12-16 21:11 -0500
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Chris Angelico <rosuav@gmail.com> - 2011-12-15 21:58 +1100
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] rusi <rustompmody@gmail.com> - 2011-12-15 03:04 -0800
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-12-15 14:48 +0200
                Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax] Terry Reedy <tjreedy@udel.edu> - 2011-12-15 18:15 -0500
            Re: % is not an operator Paul Rudin <paul.nospam@rudin.co.uk> - 2011-12-14 09:43 +0000
        Re: Verbose and flexible args and kwargs syntax Nick Dokos <nicholas.dokos@hp.com> - 2011-12-12 12:58 -0500
          Re: Verbose and flexible args and kwargs syntax Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2011-12-14 11:04 +0200
  Re: Verbose and flexible args and kwargs syntax gene heskett <gheskett@wdtv.com> - 2011-12-12 12:46 -0500
  Re: Verbose and flexible args and kwargs syntax Dave Angel <d@davea.name> - 2011-12-12 13:04 -0500
  Re: Verbose and flexible args and kwargs syntax Nick Dokos <nicholas.dokos@hp.com> - 2011-12-12 13:02 -0500

csiph-web