Skip to content

Design the call API #48

@encukou

Description

@encukou

The object calling API has grown organically over the years, and looks like an incomplete Cartesian product of features, with not-always-consistent naming.

For reference, here are the kinds of arguments the Call functions take:

Callable:

  • given object
  • given object's attribute; name given as char*
  • given object's attribute; name given as Python string
  • vectorcall arg[0] attribute; name given as Python string

Positional arguments:

  • no args
  • single object
  • tuple
  • array+length with flag (vectorcall)
  • format string + variadic arguments (...)
  • format string + va_list

Keyword arguments:

  • none accepted
  • dict
  • tuple of names or NULL (vectorcall)

We have some requests to change things, like:

Rather than evaluate each of those individually, perhaps we should look at the big picture.
How should this look, ideally?
How do we get there?

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