[Reality] in ambulation.Room where is IWalkTarget?
Donovan Preston
reality@twistedmatrix.com
Fri, 4 Jul 2003 22:11:25 -0700
On Friday, July 4, 2003, at 9:47PM, Lee Harr wrote:
> I am trying to figure out where IWalkTarget comes from in
> reality.ambulation
>
> I find that after the definition
>
> class Walk(actions.TargetAction, things.MovementEvent):
>
> the names IWalkTarget and IWalkActor are defined, but
> I do not see how that is done. Any hints?
Magic :-)
I'm not entirely sure, but I think it has something to do with the
metaclass of either TargetAction or MovementEvent. Somewhere, a
metaclass magically creates a bunch of interface classes when you
subclass, so that you don't have to define them all by hand. Saves a
tremendous amount of typing, but can be confusing if you are trying to
read the code.
dp