Thanks for the help, guys. Dictionaries to the rescue! Steven, it's certainly true that runtime creation of attributes does not fit well here. At some point, an application needs to come out of generics and deal with logic that is specific to the problem. The example I gave was classification of books, which is relatively easy to understand. The particular app I'm working with deals with specialty piping valves, where the list of rules grows complicated fairly quickly.
So, having said that "attributes are not known at design time", it seems that dictionaries are best for the generic core functionality: it's easy to iterate over arbitrary "key, value" pairs without hiccups. I can even reference a custom function by a key, and call it during the iteration to do what's necessary. The input/output dictionaries would dictate that behavior, so that would be the implementation-specific stuff. Easy enough, and the core functionality remains generic enough for re-use. Michael, I looked at the sample snippets at that link, and I'll have to try it out. Thanks! -- http://mail.python.org/mailman/listinfo/python-list