GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ast: Improve behavior for user-defined classes · Issue #117486 · python/cpython

ast: Improve behavior for user-defined classes #117486

New issue
Copy link
New issue
Copy link
Closed
#118212
Closed
ast: Improve behavior for user-defined classes#117486
#118212
Copy link
Assignees
JelleZijlstra

Description

@JelleZijlstra
JelleZijlstra
opened on Apr 2, 2024
Issue body actions

From @encukou:

          Thanks for the fix. Since it's a blocker I merged it, even though I'd have one more review comment:

It would be good to add this to the new test, and improve the behaviour (the error is quite opaque):

        class MoreFieldsThanTypes(ast.AST):
            _fields = ('a', 'b')
            _field_types = {'a': int | None}
            a: int | None = None
            b: int | None = None

Originally posted by @encukou in #117266 (comment)

Based on robotframework/robotframework#5091 (comment), we should also document _field_types.

Linked PRs

  • gh-117486: Improve behavior for user-defined AST subclasses #118212
Reacted by Pekka Klärck

Activity

  1. JelleZijlstra
    self-assigned this
    on Apr 2, 2024
  2. JelleZijlstra
    added a commit that references this issue on Apr 24, 2024

    pythongh-117486: Improve behavior for user-defined AST subclasses

    ff62a21
  3. JelleZijlstra
    closed this as completedin #118212on May 6, 2024
  4. JelleZijlstra
    added a commit that references this issue on May 6, 2024

    gh-117486: Improve behavior for user-defined AST subclasses (#118212)

    e042219
  5. SonicField
    added a commit that references this issue on May 8, 2024

    pythongh-117486: Improve behavior for user-defined AST subclasses (py…

    ca5a109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @JelleZijlstra
    JelleZijlstra

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.