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 — parser: dotted decorator names raise NameError · Issue #264 · go-python/gpython

parser: dotted decorator names raise NameError #264

New issue
Copy link
New issue
Copy link
Open
#265
Open
parser: dotted decorator names raise NameError#264
#265
Copy link

Description

@drew-512
drew-512
opened on Nov 9, 2026
Issue body actions

A decorator with a dotted name fails at runtime:

class C:
    def deco(self, f):
        return f

c = C()

@c.deco
def f():
    pass

On main (444ae5e):

NameError: "name 'c.deco' is not defined"

CPython 3.4 runs it. The parser turns the dotted name into one Name whose Id is the whole string, where CPython builds a Name plus one Attribute per component (ast_for_dotted_name in Python/ast.c). test_dotted in vm/tests/decorators.py is commented out because of it.

Go 1.27.1, darwin/arm64.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    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.