The same way += et al. are in-place: it would ask 'x' to modify itself, if it can. If not, no harm done. (It would be called as 'x = ipow(x, n, 10)' of course, just like 'x += n' is really 'x = x.__iadd__(n)')
On 2/10/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
Greg Ewing schrieb: >> What could the syntax for that be? > > It wouldn't be a syntax, just a function, e.g. > > ipow(x, n, 10) In what way would that be inplace? A function cannot rebind the variables it gets as parameters. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/thomas%40python.org
-- Thomas Wouters <[EMAIL PROTECTED]> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com