[Python-Dev] Object customization

Jeremy Hylton jeremy@cnri.reston.va.us
Mon, 17 Apr 2000 11:49:11 -0400 (EDT)


>>>>> "SM" == Skip Montanaro <skip@mojam.com> writes:

  Ken> We haven't even seen a satisfactory approach to referring to
  Ken> the function, itself, from within the function.  Maybe it's not
  Ken> even desirable to be able to do that - that's an interesting
  Ken> question.

  SM> I hereby propose that within a function the special name __
  SM> refer to the function.

I think the syntax is fairly obscure.  I'm neurtral on the whole idea
of having a special way to get at the function object from within the
body of the code.

Also, the proposal to handle security policies using attributes
attached to the function seems wrong.  The access control decision
depends on the security policy defined for the object *and* the
authorization of the caller.  You can't decide based solely on some
attribute of the function, nor can you assume that every call of a
function object will be made with the same authorization (from the
same protection domain).

Jeremy