<br>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)')
<br><br><div><span class="gmail_quote">On 2/10/07, <b class="gmail_sendername">"Martin v. Löwis"</b> <<a href="mailto:martin@v.loewis.de">martin@v.loewis.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Greg Ewing schrieb:<br>>> What could the syntax for that be?<br>><br>> It wouldn't be a syntax, just a function, e.g.<br>><br>> ipow(x, n, 10)<br><br>In what way would that be inplace? A function cannot
<br>rebind the variables it gets as parameters.<br><br>Regards,<br>Martin<br>_______________________________________________<br>Python-Dev mailing list<br><a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-dev">http://mail.python.org/mailman/listinfo/python-dev</a><br>Unsubscribe: <a href="http://mail.python.org/mailman/options/python-dev/thomas%40python.org">http://mail.python.org/mailman/options/python-dev/thomas%40python.org
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Thomas Wouters <<a href="mailto:thomas@python.org">thomas@python.org</a>><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!