Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27025
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2012-08-14 00:14 -0700 |
| References | (1 earlier) <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> <mailman.3212.1344808442.4697.python-list@python.org> |
| Subject | Re: in-place exponentiation incongruities |
| From | Giacomo Alzetta <giacomo.alzetta@gmail.com> |
| Message-ID | <mailman.3253.1344928503.4697.python-list@python.org> (permalink) |
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).
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
in-place exponentiation incongruities Giacomo Alzetta <giacomo.alzetta@gmail.com> - 2012-08-11 09:54 -0700
Re: in-place exponentiation incongruities Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-12 04:28 +0000
Re: in-place exponentiation incongruities Giacomo Alzetta <giacomo.alzetta@gmail.com> - 2012-08-12 00:14 -0700
Re: in-place exponentiation incongruities Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-12 11:03 +0000
Re: in-place exponentiation incongruities Giacomo Alzetta <giacomo.alzetta@gmail.com> - 2012-08-12 04:55 -0700
Re: in-place exponentiation incongruities Terry Reedy <tjreedy@udel.edu> - 2012-08-12 17:53 -0400
Re: in-place exponentiation incongruities Giacomo Alzetta <giacomo.alzetta@gmail.com> - 2012-08-14 00:14 -0700
Re: in-place exponentiation incongruities Giacomo Alzetta <giacomo.alzetta@gmail.com> - 2012-08-14 00:14 -0700
csiph-web