Browse Source

Allow dunder to prevent recursion

pull/45/head
Mark Gomersbach 4 years ago
parent
commit
acdfa92062
No known key found for this signature in database
GPG Key ID: B5171AF93EC64F16
  1. 4
      TermTk/TTkWidgets/splitter.py

4
TermTk/TTkWidgets/splitter.py

@ -51,10 +51,10 @@ class TTkSplitter(TTkFrame):
self._splitterInitialized = True
class _SplitterLayout(TTkLayout):
@staticmethod
# Use dunder instead of 'self' in non-static methods to avoid
# recursion.
def insertWidget(_, index, widget):
self.insertWidget(index, widget)
@staticmethod
def addWidget(_, widget):
self.addWidget(widget)
self.setLayout(_SplitterLayout())

Loading…
Cancel
Save