Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 698
    • Issues 698
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to a massive storm of spam, registration on this instance now requires explicit administrator approval. Sorry for the added friction, we're also looking into automatic filtering options.

  • PyPyPyPy
  • pypypypy
  • Merge requests
  • !595

PEP 526: Type annotations for variables

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Bitbucket Importer requested to merge bitbucket/merged-pr-595 into branch/py3.6 Feb 18, 2018
  • Overview 5
  • Commits 20
  • Pipelines 0
  • Changes 16

Created originally on Bitbucket by alcarithemad (Colin)

Was already merged in Bitbucket before import, marked as merged by the import user

This is my first attempt at contributing to pypy. It does what it says on the tin.

I'm happy to address any feedback.

notes

  • Async comprehensions

    Pulling in Python.asdl from 3.6 slightly altered the definition of ast.comprehension, adding a new attribute to support async comprehensions, as added in PEP 530. I judged this to be a small enough side effect that it was simple to modify the usage sites. The two sites where ast.comprehension is instantiated have been updated to set is_async=0.

  • __annotations__ in __main__

    PEP 526 says:

    Note that if annotations are not found statically, then the __annotations__ dictionary is not created at all.

    CPython unconditionally sets __annotations__ as an empty dict on the __main__ module. I have replicated that behavior but am not sure if it is desirable, or how to test it.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: bitbucket/merged-pr-595