On Sat, Oct 25, 2008 at 5:08 PM, Christian Vest Hansen <[EMAIL PROTECTED]> wrote: >>> == 10. "_protected" names are discarded == >> >> Unless I'm missing something, this hasn't been touched, but you also >> mentioned it's not pressing. > > I have not touched it, but it would definitely be nice to have.
Honestly, I'd be all for updating the logic like so: for name, obj in captured.items(): if not name.startswith('_') and isinstance(obj, types.FunctionType): COMMANDS[name] = obj else: __builtins__[name] = obj In other words, non-underscored functions become commands, and _everything_ else -- underscored functions, regular nonfunctions, and underscored nonfunctions -- gets tossed into the local namespace. If Niklas makes those changes to how fabfile state is stored, it may make some of this moot anyways, but as a general algorithm for stuff_in_your_fabfile => stuff_available_inside_commands I think it's probably the best way to go. Having a more robust state mechanism may also make it easier to deal with any problems in underscored methods (such as shadowing existing helper methods and so forth). -Jeff _______________________________________________ Fab-user mailing list Fab-user@nongnu.org http://lists.nongnu.org/mailman/listinfo/fab-user