Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.27 KB

python_idea.md

File metadata and controls

50 lines (37 loc) · 1.27 KB

Pull request for language improvement proposal:

Team:

  • David Baird
  • Ryan Reily
  • Aaron Davis

Intended Topic:

PEP 3104: Access to names in outer scopes This PEP adds a new keyword in Python 3.x, nonlocal, to refer to variables not in the local scope, but necessarily at the global scope either. This changes brings Python closer to true static nested scoping. Before this PEP, Python could refer to a name in any enclosing scope, but only rebind a name in the local scope or in the module-global scope.

Note: our three team members will probably work on different language proposals

Sources (so far):

Code Example (from stackoverflow, link above):

def make_counter():
    count = 0
    def counter():
        nonlocal count
        count += 1
        return count
    return counter

TODO/Status of work

  • Read email threads on this subject
  • Research how this change is being used Python 3
  • Collaborate with team on their papers
  • Write rough draft
  • Write final draft