Every other 5 lines being the equiv of:
if err != nil {
... error handling ...
}
Python just uses exceptions, and they bubble up. No need for this excessively verbose error checking.