Naming: "static type" or "extension type"?

In the documentation for PEP 590, @encukou used the term “static type” to mean the opposite of a heap type. I wasn’t familiar with that term, but I understood what it meant. The main documentation page uses the term “extension type” instead, although “static type” also occurs in the manual.

Should this be made consistent?

While I’m at it, shouldn’t it be “extension class” to use Python 3 terminology?

By “extension type” I mean any type defined by a C-API extension – both static and heap types.

Heap extension types aren’t documented that much; you need to be somewhat brave to use them, as there are still issues (see PEP 573). Their main docs are here:

I see and indeed that’s also what’s in the first Note on Then it would be better if the the title of that page would be changed to say “Static Types”.

“Static type” means to me literally “static PyTypeObject type = …;” It’s a specific way to declare a type. By the way, static types must die :slight_smile:

No. Static types are currently the preferred way to define extension types (unless you need the limited API of the Stable ABI, and can live with the limitations). I hope to change this with Python 3.9 with PEP 573. After that, the title of that tutorial should still be “Defining Extension Types”, but it should describe PyType_FromSpec*.

Yes, and we kill them by first making heap types awesome.