Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

AC: Params namedmodule with custom C names are rejected #94430

Closed
@erlend-aasland

Description

@erlend-aasland

Feature or enhancement

Currently, Argument Clinic will not allow parameters namedmodule, even though they've got a custom C name. For example, this clinic input is rejected:

/*[clinic input]mod.func    module as mod: object[clinic start generated code]*/

AC complains with"You can't have two parameters named 'module'!", even though there is no naming collision on the C level. This issue prevents AC conversion of some functions and methods in the code base, for examplewarn_explicit() in Python/_warnings.c. A workaround is to provide a custom name to the self converter, however I view that as a hack; it adds unneeded clinic code.

Hack/workaround
/*[clinic input]mod.func    _module: self(type="PyObject *")    module as mod: object[clinic start generated code]*/

Pitch

The fix is easy (itsalmost a one-liner), and it unlocks more AC conversions, without requiring unneeded hacks.

Patch

diff.txt

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp