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

"4.6. Defining Functions" should mention nonlocal #80920

Closed
pbhd mannequin opened this issue Apr 27, 2019 · 6 comments
Closed

"4.6. Defining Functions" should mention nonlocal #80920

pbhd mannequin opened this issue Apr 27, 2019 · 6 comments
Labels
3.9 only security fixes docs Documentation in the Doc dir easy type-feature A feature request or enhancement

Comments

@pbhd
Copy link
Mannequin

pbhd mannequin commented Apr 27, 2019

BPO 36739
Nosy @rhettinger, @Mariatta, @miss-islington, @pbhd
PRs
  • bpo-36739: Update controlflow.rst #12983
  • [3.7] bpo-36739: Update controlflow.rst (GH-12983) #13644
  • 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 2019-05-29.03:41:04.450>
    created_at = <Date 2019-04-27.04:24:09.534>
    labels = ['easy', 'type-feature', '3.9', 'docs']
    title = '"4.6. Defining Functions" should mention nonlocal'
    updated_at = <Date 2019-05-29.03:48:16.921>
    user = 'https://github.com/pbhd'

    bugs.python.org fields:

    activity = <Date 2019-05-29.03:48:16.921>
    actor = 'miss-islington'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2019-05-29.03:41:04.450>
    closer = 'Mariatta'
    components = ['Documentation']
    creation = <Date 2019-04-27.04:24:09.534>
    creator = 'pbhd0815'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36739
    keywords = ['patch', 'easy']
    message_count = 6.0
    messages = ['340963', '340964', '340984', '343861', '343862', '343863']
    nosy_count = 5.0
    nosy_names = ['rhettinger', 'docs@python', 'Mariatta', 'miss-islington', 'pbhd0815']
    pr_nums = ['12983', '13644']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue36739'
    versions = ['Python 3.9']

    @pbhd
    Copy link
    Mannequin Author

    pbhd mannequin commented Apr 27, 2019

    In the fourth paragraph, the sentence

    "Thus, global variables cannot be directly assigned a value within a function (unless named in a global statement)"

    should somehow be extended to mention the nonlocal-statements:

    Thus, global variables or variables of enclosing functions cannot be directly assigned a value within a function (unless named in a global statement (for global variables) or named in a nonlocal statement (for variables of enclosing functions)

    @pbhd pbhd mannequin added the 3.9 only security fixes label Apr 27, 2019
    @pbhd pbhd mannequin assigned docspython Apr 27, 2019
    @pbhd pbhd mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Apr 27, 2019
    @rhettinger
    Copy link
    Contributor

    Thanks for the suggestion. Would you like to submit a PR?

    @pbhd
    Copy link
    Mannequin Author

    pbhd mannequin commented Apr 27, 2019

    ok, will try to create a pull-request for that, although i'm not a natural englishman...

    @miss-islington
    Copy link
    Contributor

    New changeset e1f95e7 by Miss Islington (bot) (pbhd) in branch 'master':
    bpo-36739: Update controlflow.rst (GH-12983)
    e1f95e7

    @Mariatta
    Copy link
    Member

    Thanks!

    @miss-islington
    Copy link
    Contributor

    New changeset cee95fe by Miss Islington (bot) in branch '3.7':
    bpo-36739: Update controlflow.rst (GH-12983)
    cee95fe

    @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.9 only security fixes docs Documentation in the Doc dir easy type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants