Sorry, I really am dense sometimes. I have been wrestling with a problem that involved code versioning, so when you asked a question about "version" I took it to mean something related to version numbers. But more likely you were asking what the equivalent hoc statement might be.
The python statement
foo.connect(bar, 0.5, 0)
would connect the 0 end of a (child) section called foo to the 0.5 location (midpoint) of a (parent) section called bar.
The "self" keyword is used inside of a block of python code that defines a new object class, to refer to things that belong to an instance of that class. A statement of the form
self.foo.connect(self.bar, 0.5, 0)
means that an instance of the class will have two sections foo and bar where foo is a child of bar and foo's 0 end is attached to the middle of bar.
hoc templates allow definition of new cell classes made out of sections that are connected to each other, but without having to use the "self" keyword. The easiest way to generate a very clean, bug-free and well-organized cell class definition in hoc is to use the CellBuilder to construct a model cell, then export a new cell class from the CellBuilder. There is no equivalent tool for python, which is too bad, because users must then depend on their own programming skills and programming styles, and the results are not always pretty.