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

Function variable wrongly reported unassigned #51995

Closed
adrianmay mannequin opened this issue Jan 21, 2010 · 3 comments
Closed

Function variable wrongly reported unassigned #51995

adrianmay mannequin opened this issue Jan 21, 2010 · 3 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@adrianmay
Copy link
Mannequin

adrianmay mannequin commented Jan 21, 2010

BPO 7747
Nosy @ezio-melotti
Files
  • bug.py: Code to demo the bug
  • 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 2010-01-21.07:48:00.435>
    created_at = <Date 2010-01-21.07:32:37.920>
    labels = ['interpreter-core', 'type-bug', 'invalid']
    title = 'Function variable wrongly reported unassigned'
    updated_at = <Date 2010-01-21.15:17:03.343>
    user = 'https://bugs.python.org/adrianmay'

    bugs.python.org fields:

    activity = <Date 2010-01-21.15:17:03.343>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2010-01-21.07:48:00.435>
    closer = 'ezio.melotti'
    components = ['Interpreter Core']
    creation = <Date 2010-01-21.07:32:37.920>
    creator = 'adrianmay'
    dependencies = []
    files = ['15963']
    hgrepos = []
    issue_num = 7747
    keywords = []
    message_count = 3.0
    messages = ['98101', '98102', '98104']
    nosy_count = 2.0
    nosy_names = ['ezio.melotti', 'adrianmay']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue7747'
    versions = ['Python 2.5']

    @adrianmay
    Copy link
    Mannequin Author

    adrianmay mannequin commented Jan 21, 2010

    Hi folks,

    The attached program says:

    $ ./bug.py
    a
    None
    b
    Traceback (most recent call last):
      File "./bug.py", line 49, in <module>
        print number(s)
      File "./bug.py", line 34, in foo
        while eat != None:
    UnboundLocalError: local variable 'eat' referenced before assignment

    but I reckon it is assigned. (I haven't tried it on a newer python because the junk I want to use with python says it only works with 2.5.2.)

    Cheers, Adrian.

    @adrianmay adrianmay mannequin added build The build process and cross-build interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Jan 21, 2010
    @ezio-melotti
    Copy link
    Member

    @ezio-melotti ezio-melotti added type-bug An unexpected behavior, bug, or error and removed build The build process and cross-build labels Jan 21, 2010
    @adrianmay
    Copy link
    Mannequin Author

    adrianmay mannequin commented Jan 21, 2010

    OK, Thanks. Sorry for the hassle.

    Adrian.

    @adrianmay adrianmay mannequin added build The build process and cross-build and removed type-bug An unexpected behavior, bug, or error labels Jan 21, 2010
    @bitdancer bitdancer added type-bug An unexpected behavior, bug, or error and removed build The build process and cross-build labels Jan 21, 2010
    @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