Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#18 Return the Template associated with a Fact

closed
6
2008-01-21
2008-01-21
Francesco Garosi
No

The CLIPS API allows, knowing a pointer to a fact, to retrieve the associated deftemplate if any. This must be allowed from within PyCLIPS (for instance in order to retract a fact and reassert it with changed slots).

Discussion

  • Logged In: YES
    user_id=328337
    Originator: YES

    Strangely enough, also for facts that do not have an associated deftemplate (ordered facts), a Template is returned. However, it is more like a placeholder: for instance, it does not have a pretty-print form. But also for ordered facts the deftemplate-like object can be useful to reassert the fact itself. The updated code has been posted to SVN, and will be released in 1.0.7 as stable code (with an appropriate set of tests).

     
    • status: open --> closed
     
  • Logged In: YES
    user_id=328337
    Originator: YES

    The fixes for this bug or request have been accepted and
    committed to current CVS tree: next release will include these
    fixes, possibly among other enhancements.