It is a better name for the .name properties (the one that gets logged in the console.) This is very helpful in debugging, particular in the early stages of the project.
The GObject.type_name produces more consistent and better names for classes and methods, unlike GI.BaseInfo.get_name, which only returns the name of the type without including the namespace info.
Another alternative would be just using namespace + name (factoring in parent types). Compare:
It is a better name for the
.name
properties (the one that gets logged in the console.) This is very helpful in debugging, particular in the early stages of the project.The
GObject.type_name
produces more consistent and better names for classes and methods, unlikeGI.BaseInfo.get_name
, which only returns the name of the type without including the namespace info.Another alternative would be just using
namespace
+name
(factoring in parent types). Compare:GObject.type_name
GI.BaseInfo.get_name
namespace
+name
GtkWidget
Widget
Gtk.Widget
gtk_widget_init_template
init_template
Gtk.Widget.init_template
GObject
Object
GObject.Object