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

Python 3.6.3: JSON loop fails using elif #75978

Closed
FrancescoMantovani mannequin opened this issue Oct 16, 2017 · 4 comments
Closed

Python 3.6.3: JSON loop fails using elif #75978

FrancescoMantovani mannequin opened this issue Oct 16, 2017 · 4 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@FrancescoMantovani
Copy link
Mannequin

FrancescoMantovani mannequin commented Oct 16, 2017

BPO 31797
Nosy @ericvsmith, @stevendaprano
Files
  • Test_log_bug.py: Google API test script
  • 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 2017-10-16.12:35:50.600>
    created_at = <Date 2017-10-16.10:14:43.339>
    labels = ['interpreter-core', 'type-bug', 'invalid']
    title = 'Python 3.6.3: JSON loop fails using elif'
    updated_at = <Date 2017-10-16.12:35:50.598>
    user = 'https://bugs.python.org/FrancescoMantovani'

    bugs.python.org fields:

    activity = <Date 2017-10-16.12:35:50.598>
    actor = 'steven.daprano'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-10-16.12:35:50.600>
    closer = 'steven.daprano'
    components = ['Interpreter Core']
    creation = <Date 2017-10-16.10:14:43.339>
    creator = 'Francesco Mantovani'
    dependencies = []
    files = ['47222']
    hgrepos = []
    issue_num = 31797
    keywords = []
    message_count = 4.0
    messages = ['304465', '304469', '304470', '304471']
    nosy_count = 3.0
    nosy_names = ['eric.smith', 'steven.daprano', 'Francesco Mantovani']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue31797'
    versions = ['Python 3.6']

    @FrancescoMantovani
    Copy link
    Mannequin Author

    FrancescoMantovani mannequin commented Oct 16, 2017

    I attach here a file with 3 different way to parse Google Places API.

    Please put your Google API key token into the variable [PutHereYourGoogleAPIKey] to make the script work.

    The script contains 3 loops:

    • the first loop works and that's how I fixed the problem
    • the second loop fail because of the elif
    • the third loop works because all elif were removed

    @FrancescoMantovani FrancescoMantovani mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Oct 16, 2017
    @ericvsmith
    Copy link
    Member

    Hi, Francesco.

    This isn't the appropriate place to ask for help with your script.

    I suggest trying the python-list mailing list.

    @stevendaprano
    Copy link
    Member

    What are you claiming is the bug? I don't understand what you think the problem is.

    Don't dump a large script in our laps and expect us to get a Google API key to run it. Forget that, it isn't going to happen. Simplify your code to make the smallest, simplest demonstration you can.

    Please read: http://sscce.org/

    Then tell us:

    • what you expect to happen
    • what actually happens
    • show any output you get
    • including any exception.

    To start with, there's no need to query five fields, if one field is enough. Make your code as simple as you can. Don't leave "dead code" commented out, delete it.

    @stevendaprano
    Copy link
    Member

    Oops, accidentally messed up the status. Fixing now.

    Francesco, if you simplify your code and come back with a detailed description of what you think the bug is, then we will investigate.

    @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
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants