![](https://secure.gravatar.com/avatar/0486cf9fb94e8cec8713e1aba06f587b.jpg?s=120&d=mm&r=g)
On Fri, 14 Apr 2000, Vladimir Marangozov wrote:
... If you prefer embedded definitions, among other things, you could do:
__zope_access__ = { 'Spam' : 'public' }
class Spam: __zope_access__ = { 'eggs' : 'private', 'eats' : 'public' } def eggs(self, ...): ... def eats(self, ...): ...
or have a completely separate class/structure for access control (which is what you would do it in C, btw, for existing objects to which you can't add slots, ex: file descriptors, mem segments, etc).
This is uglier than attaching the metadata directly to the target that you are describing! If you want to apply metadata to functions, then apply them to the function! Don't shove them off in a separate structure. You're the one talking about cleanliness, yet you suggest something that is very poor from a readability, maintainability, and semantic angle. Ick. Cheers, -g -- Greg Stein, http://www.lyra.org/