There was a problem hiding this comment.
i wonder how and works if there's no comparison
just
if x is false: x else: y
and not
if x is True and y is True: True else: False
Sorry, something went wrong.
|
i wonder how and works if there's no comparison Thanks will do the change |
Sorry, something went wrong.
| | | *y* | | | ||
| +-------------+---------------------------------+-------+ | ||
| | ``x and y`` | if *x* is True and *y* is True, | \(2) | | ||
| | | then True, else False | | |
There was a problem hiding this comment.
I think you misunderstood the other comment, as this now doesn't cover something like
Sorry, something went wrong.
There was a problem hiding this comment.
could you please tell then how should it be framed, bcoz I am not able to think of it
Sorry, something went wrong.
There was a problem hiding this comment.
if x and y, then True, else False
it covers if it's Null, empty, False...
Sorry, something went wrong.
There was a problem hiding this comment.
thanks i'll do it
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM IMO; it avoids a double negative (if false, else) and the order follows more closely with that of the expression itself
Sorry, something went wrong.
|
Thanks @ramvikrams for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
Sorry, something went wrong.
|
GH-102108 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
|
GH-102109 is a backport of this pull request to the 3.10 branch. |
Sorry, something went wrong.
|
Oops, forgot to fix the title...hope you fixed it in the commit message :) |
Sorry, something went wrong.
|
Oops, forgot to fix the title...hope you fixed it in the commit message :) I did... hope you like it 😄 b40dd71 |
Sorry, something went wrong.
|
Oh, that's fine then of course :) At least for me updating the title-generated commit message updates the PR title as well, but it seems that's actually GitHub Refined rather than a builtin feature (I never know these days, heh) |
Sorry, something went wrong.
gh-100556: changed the or documentation