New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-100556: Better or
doc working
#100589
base: main
Are you sure you want to change the base?
gh-100556: Better or
doc working
#100589
Conversation
Thanks will do the change |
Doc/library/stdtypes.rst
Outdated
| | *y* | | | ||
+-------------+---------------------------------+-------+ | ||
| ``x and y`` | if *x* is True and *y* is True, | \(2) | | ||
| | then True, else False | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you misunderstood the other comment, as this now doesn't cover something like
>>> [] and [1]
[]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please tell then how should it be framed, bcoz I am not able to think of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if x and y, then True, else False
it covers if it's Null, empty, False...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks i'll do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original mention of 'true'/'false' refers to all truthy and falsey values, which include 0, None, empty lists, etc., and saying True
excludes those as True
refers to just the boolean value. I also don't think that it's all that helpful for a table to have an entry to say x and y
then its explanation also say x and y
, so I would actually recommend just sticking with the original for this and
section.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-100556: changed the or documentation