BUILD Dictionary vs factory functions: doc the class, not the factory

Review Request #1126 - Created Oct. 7, 2014 and submitted

Larry Hosken

Wondering why the docs for 'bundle' say 'Return a factory method that can
create bundles rooted at the parse context path.' ? This is why.

This change...
Before, any method tagged with @manual.builddict() got pulled into the
BUILD Dictionary. This change introduces a param: now to pull in a
method, decorate it @manual.builddict(show_param=True).

And introduce another @manaul.builddict() param, factory. The builddict
goal, if it sees a symbol tagged @manual.builddict(factory=True), hopes
the factory is a class method and doc's the attached class instead of
the factory function itself.

Not sure if this is the best reflection-y way to get at the "factory's class".

  • Mmmmaybe it makes more sense to do something in the build_file_aliases/context_aware_object_factories dealie?

  • Mmmmaybe instead of assuming im_self will be there, could invoke the factory with a <handwave> generic ParseContext </handwave> and get the __class__ of the returned object.

  • Or something

Larry Hosken
John Sirois
Larry Hosken
John Sirois
John Sirois
Larry Hosken
Larry Hosken
Review request changed

Status: Closed (submitted)