Restrictive APIs for Python

Gabriel Genellina gagsl-py at yahoo.com.ar
Fri Dec 15 10:49:15 EST 2006


On 15 dic, 11:31, "Will Ware" <will.w... at gmail.com> wrote:
> Python has no inherent provision for a restrictive API that blocks
> accesses to methods and variables outside an allowed set.
> Inexperienced Python programmers may fail to adhere to an agreed-upon
> API, directly accessing the private internals of a class.

In Python, the usual way of saying "don't play with me" is prepending
an underscore: _private
BTW, have you *ever* tested your code?

-- 
Gabriel Genellina




More information about the Python-list mailing list