Closed PrzemoF closed 6 years ago
It's a variation of the "builder pattern". Returning self
allows you to construct an object and set some properties for it using a convenient single-line construction like:
scanner = Scanner().withDelegate(ScanDelegate())
(from scanner.py).
From the docs:
I find this a bit confusing. It returns the same object as the constructor. Feel free to close if there is a good reason behind it.