Hi,


This is the standard way to create a class in C using python: define a PyTypeObject with all the type methods. Here we only have a tp_new one that is custom that is used to create a Variable.
You can see below in the same file that it is then added to the current module (_C) with the name “_LegacyVariableBase”.


Which observations are you talking about? the fact that this did not exist? It always existed (with a different name). You will find in all the python_** files in the same folder similar declarations for all the python objects that we use to wrap autograd objects