A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/071116.html below:

[Python-Dev] Why is nb_inplace_power ternary?

[Python-Dev] Why is nb_inplace_power ternary? [Python-Dev] Why is nb_inplace_power ternary?"Martin v. Löwis" martin at v.loewis.de
Wed Feb 14 18:11:55 CET 2007
Thomas Wouters schrieb:
> 
> 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)')

I think this would violate the policy that a mutating function shouldn't
give the object being modified as the result - just as list.reverse
doesn't return the list, in addition to reversing it in-place.

Regards,
Martin

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4