Non-member vs member functions in Python
问题 I'm relatively new to Python and struggling to reconcile features of the language with habits I've picked up from my background in C++ and Java. The latest issue I'm having has to do with encapsulation, specifically an idea best summed up by Item 23 of Meyer's " Effective C++ ": Prefer non-member non-friend functions to member functions. Ignoring the lack of a friend mechanism for a moment, are non-member functions considered preferable to member functions in Python , too? An obligatory,