[issue46139] Boolean Logic Check - Built-in Types Documentation page

2021-12-20 Thread Abri Vincent

New submission from Abri Vincent :

On the documentation page https://docs.python.org/3/library/stdtypes.html the 
header 'Boolean Operations — and, or, not' provides a table (attached as an 
image). 

It states: 

a.1) x OR y - if x is false, then y, else x **
a.2) x AND y - if x is false, then x, else y **

When I read this i intuit the following

b.1) x OR y - if x is false, then x, else y
b.2) x AND y - if x is false, then y, else x

Providing an example with a.1 which is currently listed in the documentation

If x is false -> else x = False (we don't check if Y=True which is the 
definition of an OR operator). 

** This is a short-circuit operator, so it only evaluates the second argument 
if the first one is false.

I would appreciate clarification on this and if others see an issue with the 
documentation after reading my description able then movement on consensus to 
correct the documentation

--
assignee: docs@python
components: Documentation
messages: 408972
nosy: abriabrisham, docs@python
priority: normal
severity: normal
status: open
title: Boolean Logic Check - Built-in Types Documentation page

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46139] Boolean Logic Check - Built-in Types Documentation page

2021-12-20 Thread Abri Vincent


Change by Abri Vincent :


--
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46139] Boolean Logic Check - Built-in Types Documentation page

2021-12-20 Thread Abri Vincent


Abri Vincent  added the comment:

A short circuit operator. 

x OR y - if x is false, then y, else x (1). 

(1) This is a short-circuit operator, so it only evaluates the second argument 
if the first one is false.

The first argument is 'if'
The second argument is 'then'
The third argument is 'else'

Move to the second argument if the first is false. 
Evaluate the first argument 'if x is false' - look at the second argument if 
the first argument is false - 'then y'.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com