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

Update of reasoning why there is no case statement #84614

Closed
amaajemyfren mannequin opened this issue Apr 29, 2020 · 5 comments
Closed

Update of reasoning why there is no case statement #84614

amaajemyfren mannequin opened this issue Apr 29, 2020 · 5 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@amaajemyfren
Copy link
Mannequin

amaajemyfren mannequin commented Apr 29, 2020

BPO 40434
Nosy @nanjekyejoannah, @amaajemyfren
PRs
  • bpo-40434: Update the reason why CPython doesn't have switch statements #19787
  • 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 = None
    created_at = <Date 2020-04-29.08:27:47.560>
    labels = ['3.8', 'type-feature', '3.7', '3.9', 'docs']
    title = 'Update of reasoning why there is no case statement'
    updated_at = <Date 2020-05-01.17:23:06.579>
    user = 'https://github.com/amaajemyfren'

    bugs.python.org fields:

    activity = <Date 2020-05-01.17:23:06.579>
    actor = 'nanjekyejoannah'
    assignee = 'docs@python'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2020-04-29.08:27:47.560>
    creator = 'amaajemyfren'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40434
    keywords = ['patch']
    message_count = 4.0
    messages = ['367633', '367710', '367838', '367865']
    nosy_count = 3.0
    nosy_names = ['docs@python', 'nanjekyejoannah', 'amaajemyfren']
    pr_nums = ['19787']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue40434'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @amaajemyfren
    Copy link
    Mannequin Author

    amaajemyfren mannequin commented Apr 29, 2020

    The design and history FAQ (https://docs.python.org/dev/faq/design.html#why-isn-t-there-a-switch-or-case-statement-in-python) explains why there is no case statement referencing PEP-275(https://www.python.org/dev/peps/pep-0275/).

    For Python 3 there is, however, PEP-3103(https://www.python.org/dev/peps/pep-3103/) which rejected the proposal for a switch statement.

    @amaajemyfren amaajemyfren mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Apr 29, 2020
    @amaajemyfren amaajemyfren mannequin assigned docspython Apr 29, 2020
    @amaajemyfren amaajemyfren mannequin added docs Documentation in the Doc dir 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Apr 29, 2020
    @amaajemyfren amaajemyfren mannequin assigned docspython Apr 29, 2020
    @amaajemyfren amaajemyfren mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Apr 29, 2020
    @nanjekyejoannah
    Copy link
    Member

    What is your reasoning on referencing just one of the PEPs and not both of them?

    @amaajemyfren
    Copy link
    Mannequin Author

    amaajemyfren mannequin commented May 1, 2020

    the statement initially said that there was _no consensus yet on how to do range tests_. This is not true because there is now a decision to not do range tests - that decision is only in PEP-3103 and not in PEP-275 (PEP-275 actually links to PEP-3103 to explain why it is rejected). My feeling is that putting two references complicates the goal of explaining it.

    @nanjekyejoannah
    Copy link
    Member

    PEP-275 actually links to PEP-3103 to explain why it is rejected

    Well, am not very convinced if consensus was reached on range tests so I will refrain for someone else's opinion as it is not as apparent to me yet.

    @iritkatriel
    Copy link
    Member

    out of date (see discussion on PR).

    @iritkatriel iritkatriel closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants