> Remember that Meyers is talking about C++ here, where there's a > distinction in the `friendliness' of a function. He himself says that > the choice is between non-member non-friend functions and member > functions (i.e. methods). Friend functions have the same dependency > on implementation changes as methods. > > In Python, there is no such friend distinction, although you can come > close to faking it with private names. So the argument based on > degrees of encapsulation doesn't hold water in Python. > > in-python-everyone's-your-friend-and-thank-guido-for-that-ly y'rs, I disagree. While non-methods *can* look inside an implementation, it's still implied that they break encapsulation if they do. (This may explain why you like to use private names -- they make the encapsulation explicit. For me, it exists even when it is implicit.) --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4