A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-November/010754.html below:

[Python-Dev] A house upon the sand)

Methods vs. Functions (Re: [Python-Dev] A house upon the sand) Methods vs. Functions (Re: [Python-Dev] A house upon the sand)Guido van Rossum guido@python.org
Mon, 27 Nov 2000 19:12:01 -0500
> 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