Uzytkownik "Steven Bethard" <[EMAIL PROTECTED]> napisal w wiadomosci news:[EMAIL PROTECTED] > Any reason you can't define it like: > > class actor(object): > def __init__(self): > self.roles = [] > def act(self): > for role_func in self.roles: > role_func(self) [snip] > By importing actor, they have full access to the global namespace of > the actor.actor object, by simply accessing the actor module > attributes. > > So the issue here is really about full *local* namespace access. Do > you really need *full* local namespace access? Why isn't access to > the actor.actor instance sufficient?
!!! Yep, of course it is sufficient. Abondoning the obvious role_func() must have had some good reasons some time ago, but now I can not even remember them, probably they were not so important :-) Thanks a million, Filip -- http://mail.python.org/mailman/listinfo/python-list