AdamVerner / oscilo

school project
GNU General Public License v3.0
0 stars 0 forks source link

different style of __init__ calling #11

Closed AdamVerner closed 5 years ago

AdamVerner commented 5 years ago
class SomeBox(Gtk.Box):
    def __init__(self):
        Gtk.Box.__init__(self)
class ObjectThatChangesTypeOften(Gtk.Something):
    def __init__(self):
        super(ObjectThatChangesTypeOften, self).__init__()

the first one is much simpler the latter seems much more pythonic.

although the second one isn't as readable, it's wonderfull in place where the super class changes often.

AdamVerner commented 5 years ago

also can be simple copy&pasted

AdamVerner commented 5 years ago

netuším jakto, ale když z dítěte Gtk.Boxu zavolám

 Gtk.Grid.__init__(self)

tak to funguje......

AdamVerner commented 5 years ago

nevím, jestli to používam všude, ale skončil jsem u:

class ObjectThatChangesTypeOften(Gtk.Something):
    def __init__(self):
        super(ObjectThatChangesTypeOften, self).__init__()
AdamVerner commented 5 years ago

solving in: #12