Skip to content
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

Unacceptable Output #86628

Closed
Kshitish mannequin opened this issue Nov 25, 2020 · 2 comments
Closed

Unacceptable Output #86628

Kshitish mannequin opened this issue Nov 25, 2020 · 2 comments
Labels
3.8 only security fixes OS-windows type-bug An unexpected behavior, bug, or error

Comments

@Kshitish
Copy link
Mannequin

Kshitish mannequin commented Nov 25, 2020

BPO 42462
Nosy @pfmoore, @tjguk, @zware, @zooba, @tirkarthi
Files
  • Screenshot 2020-11-25 161636.png: Check the png for better understanding
  • Screenshot 2020-11-25 181647.png: Final One
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-11-25.13:57:17.499>
    created_at = <Date 2020-11-25.11:41:29.922>
    labels = ['invalid', 'type-bug', '3.8', 'OS-windows']
    title = 'Unacceptable Output'
    updated_at = <Date 2020-11-25.13:57:17.499>
    user = 'https://bugs.python.org/Kshitish'

    bugs.python.org fields:

    activity = <Date 2020-11-25.13:57:17.499>
    actor = 'eric.smith'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-11-25.13:57:17.499>
    closer = 'eric.smith'
    components = ['Windows']
    creation = <Date 2020-11-25.11:41:29.922>
    creator = 'Kshitish'
    dependencies = []
    files = ['49621', '49622']
    hgrepos = []
    issue_num = 42462
    keywords = []
    message_count = 2.0
    messages = ['381821', '381826']
    nosy_count = 6.0
    nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'steve.dower', 'xtreak', 'Kshitish']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue42462'
    versions = ['Python 3.8']

    @Kshitish
    Copy link
    Mannequin Author

    Kshitish mannequin commented Nov 25, 2020

    Wrong Output

    @Kshitish Kshitish mannequin added 3.8 only security fixes OS-windows type-bug An unexpected behavior, bug, or error labels Nov 25, 2020
    @tirkarthi
    Copy link
    Member

    Please don't attach images since text will have better accessibility for readers. The expression is as below and is a result of operator precedence :
    https://docs.python.org/3/reference/expressions.html#operator-precedence

    >>> 7+3==10 | 7+1==8 and not(10!=10)
    False
    
    
    >>> (7+3) == (10 | (7 +1)) == 8
    False
    >>> (7+3) == (10 | (7 +1)) == 10
    True

    It would be good to use parens to indicate explicit bracing that helps in readability and understanding it in future for complex operations in 1 line.

    Please refrain from creating multiple issues as explained in the other issues using stack overflow, python tutor, etc will be better forums to ask for help

    https://bugs.python.org/issue42460
    https://bugs.python.org/issue42456
    https://bugs.python.org/issue42459

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes OS-windows type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants