On Aug 23, 2:20 pm, Zeekar <markjr... / gmail.com> wrote:
> I want to define a method C.foo() that other classes
> outside of C can't call directly.  Other class methods of C can call
> it, fine.  But the goal is to have *instances* of C to be able to call
> it.
>
> I guess I could make it a private instance method that just happens
> not to care about self., but that seems like misleading design.

Without seeing the code you're actually working with, it seems to me
that I'd much rather see the method implemented as a private instance
method than as a class method (assuming that the purpose is to serve
as a utility method for use inside instances of the class).

I'm not sure why that would be considered misleading, and it would be /
much/ easier to follow the code than if you try to use some of the
other solutions offered. Not that the code suggested is /bad/, it's
just overkill for what you seem to be trying to accomplish, IMO.

--
Regards,

John Wilger