I've been thinking if there's a point in applying some specific OOP
techniques in Python as we do in other languages.
i.e. we usually define private properties and provide public functions
to access them, in the form of:
get { ... } set { ... }

Should we do the same in Python:

self.__privateAttr = 'some val'

def getPrivateAttr(self):
    return self.__privateAttr

Or there's no point in doing so?

Some other techniques come to mind, but I think that Python tends to
allow the programmer to access stuff he wants even though he shouldn't
or in the form of a dict or list, rather than a method to do so.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to