Re: Restrictive APIs for Python

2006-12-15 Thread Gabriel Genellina
On 15 dic, 13:46, "Will Ware" <[EMAIL PROTECTED]> wrote: > Gabriel Genellina wrote: > > In Python, the usual way of saying "don't play with me" is prepending > > an underscore: _private > Thanks, I am familiar with that. So enforce it instead of going against the nature of the language. > > BTW, h

Re: Restrictive APIs for Python

2006-12-15 Thread Will Ware
Gabriel Genellina wrote: > In Python, the usual way of saying "don't play with me" is prepending > an underscore: _private Thanks, I am familiar with that. > BTW, have you *ever* tested your code? Yes, we have a QA process. The problem is not that the code doesn't work, it does. It was developed

Re: Restrictive APIs for Python

2006-12-15 Thread Roberto Bonvallet
Will Ware 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. Just don't document

Re: Restrictive APIs for Python

2006-12-15 Thread Gabriel Genellina
On 15 dic, 11:31, "Will Ware" <[EMAIL PROTECTED]> 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 int

Restrictive APIs for Python

2006-12-15 Thread Will Ware
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. Adherence to defined APIs is a good thing. Thi