[Reality] in ambulation.Room where is IWalkTarget?
Glyph Lefkowitz
reality@twistedmatrix.com
Sat, 5 Jul 2003 09:46:15 -0500
On Saturday, July 5, 2003, at 12:11 AM, Donovan Preston wrote:
> I'm not entirely sure, but I think it has something to do with the
> metaclass of either TargetAction or MovementEvent.
It's TargetAction. All actions have certain "slots" that have to be
filled, and each slot has a corresponding interface. For TargetAction,
those slots are Place, Target, and Actor. You can see this defined
with the attribute 'interfaceTypes' in reality.actions.TargetAction.
> 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.
However, those interfaces will not be created if they are already
defined, if you want to make the code easier to read, and they are all
defined in such a way that they will properly have documentation
generated from them if you use a run-time documentation generator such
as epydoc. I'd recommend playing with epydoc at least once over the
NewReality codebase to get a feel for everything that's generated.