May-30-2024, 06:41 AM
(May-30-2024, 01:29 AM)PyDan Wrote: To me, get with no arguments means return an instance, I would read it as.You're probably biased by your C++ culture, although
cin.get()
does not return an input stream in C++.The problem is that we don't have a star operator to dereference pointers in Python. It is not possible to write
resource = *mediatorSo the
.get()
method appears to be a simple way to mean 'dereference that pointer', unless you see a better alternative?I would never interprete
mediator.get()
as 'get a Mediator'. Also in the Python culture, the example of the tkinter variables enlights the meaning of this 'get()'.
« We can solve any problem by introducing an extra level of indirection »