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-August/074369.html below:

[Python-Dev] Order of operations

[Python-Dev] Order of operations [Python-Dev] Order of operationsScott Dial scott+python-dev at scottdial.com
Thu Aug 30 07:49:10 CEST 2007
Martin v. Löwis wrote:
> Alexandre Vassalotti schrieb:
>> C doesn't have an exponentiation operator. You use the pow() function, instead:
> 
> Right. Then Scott's claim ("Because it is consistent with C's precedence
> rules.") can't be true - from C precedence, it does not follow that **
> must have higher precedence than unary -.
> 

I believe the confusion with my claim is that I thought the oddity in 
question was that -3/2 != 0-3/2, but I believe you took the other half 
about exponentiation as the oddity in question that -3**2 == -(3**2). My 
original comment was to say that unary - was higher precedence than 
division because of C's ordering. With respect to the original question, 
then my answer was poor as I ignored the exponentiation part. Since we 
tacked this on, my answer was to be an implicit zen answer of "because 
it makes the most sense."

Sorry for the added noise.

-Scott

-- 
Scott Dial
scott at scottdial.com
scodial at cs.indiana.edu
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