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/070914.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
Sat Feb 10 13:42:37 CET 2007
Jim Jewett schrieb:
> Either
> 
> x**= n % 10             # The **= changes the parse context, so that %
> is no longer
>                                 # immediately evaluated

Are you seriously proposing such a change? I was asking for
spellings that currently don't have a meaning (rather, I was
suggesting that no such spelling exists, and the entire idea
of supporting such notation in the language is ridiculous).

> x**= (n, 10)              # exponentiation to a tuple isn't currently
> defined, and it

Likewise: it currenly is well-defined: it invoked nb_inplace_power
with the tuple (and __ipow__ if x's class is written in Python).
Whether this gives a TypeError or not depends on the class of x.

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