mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Bug #1777160: mention explicitly that e.g. -1**2 is -1.
This commit is contained in:
		
							parent
							
								
									d7e9f608c3
								
							
						
					
					
						commit
						ff457b1d05
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -789,7 +789,7 @@ less tightly than unary operators on its right.  The syntax is:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Thus, in an unparenthesized sequence of power and unary operators, the operators
 | 
					Thus, in an unparenthesized sequence of power and unary operators, the operators
 | 
				
			||||||
are evaluated from right to left (this does not constrain the evaluation order
 | 
					are evaluated from right to left (this does not constrain the evaluation order
 | 
				
			||||||
for the operands).
 | 
					for the operands): ``-1**2`` results in ``-1``.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The power operator has the same semantics as the built-in :func:`pow` function,
 | 
					The power operator has the same semantics as the built-in :func:`pow` function,
 | 
				
			||||||
when called with two arguments: it yields its left argument raised to the power
 | 
					when called with two arguments: it yields its left argument raised to the power
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue