Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python': 0.09; 'inserted': 0.09; 'terry': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr :python-list': 0.10; 'argument.': 0.16; 'reedy': 0.16; 'subject:skip:e 10': 0.16; 'ugly.': 0.16; 'subject:skip:i 10': 0.22; "i'd": 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'coded': 0.29; 'probably': 0.29; 'function': 0.30; 'implement': 0.32; 'true.': 0.33; 'version': 0.34; 'received:google.com': 0.34; 'third': 0.34; 'built-in': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'planning': 0.38; 'subject:-': 0.40; 'think': 0.40; '*really*': 0.84 Newsgroups: comp.lang.python Date: Tue, 14 Aug 2012 00:14:54 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=151.51.45.176; posting-account=uBCs_goAAABnqb0dwcS_m7_qp7XDdB0G References: <502730da$0$29983$c3e8da3$5496439d@news.astraweb.com> <5bc4e58c-c587-46c3-93cc-95dea97d89e8@googlegroups.com> <50278d6b$0$29978$c3e8da3$5496439d@news.astraweb.com> <3118027d-0c13-425e-a874-4593b608cf45@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 151.51.45.176 MIME-Version: 1.0 Subject: Re: in-place exponentiation incongruities From: Giacomo Alzetta To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1344928503 news.xs4all.nl 6895 [2001:888:2000:d::a6]:35068 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27025 Il giorno domenica 12 agosto 2012 23:53:46 UTC+2, Terry Reedy ha scritto: > > Are you actually planning to do this, or is this purely theoretical? > Yes, I do plan to implement ipow. > > Not true. Whether the function is coded in Python or C > > cls.__ipow__(base, exp, mod) # or > > base.__ipow__(exp, mod) > > > > > while he would be able to > > > call the normal version with the third argument. Yes, that's true. But I find that calling a special-method in that way is *really* ugly. I'd think that the pow built-in function was probably inserted to avoid writing base.__pow__(exp, mod).