Skip to content

Binder: describe() for named constants (STATIC_GETTER) without reading the value #36

Closed

Description

@b-re-w

Reported by pythonx-compose (M2 #9, INTENT §5.3 grouped spelling Alignment.Horizontal.End). describe() takes callables only; a STATIC_GETTER yields its value on access, so describe(Alignment.End) is a TypeError. pythonx-compose needs the constant's declared return type (End -> androidx.compose.ui.Alignment.Horizontal) to build its grouping rule, without a private attribute or a Kotlin call per constant.

Decided: python_multiplatform.describe(module, name) (two-argument form) returns the same dict shape for any bound name, including kind: 'STATIC_GETTER' and returns, without evaluating the getter.

Completion: describe(androidx.compose.ui.Alignment, 'End')['returns'] == 'androidx.compose.ui.Alignment.Horizontal' and kind STATIC_GETTER; one-argument callables unchanged; the getter is not invoked (asserted); tamper check.

Activity

  1. b-re-w commented on Oct 3, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #51.

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