pyRete update
I just realized I haven't updated the pyRete subversion repository for quite some time. This update contains a lot of bug fixes and support for Temporal Facts.
pyRete> import datetimePeter and Edson have been blogging and thinking alot more about Temporal Facts if you're interested.
pyRete> watch(FACTS)
pyRete> datetime.datetime.now()
datetime.datetime(2007, 5, 15, 22, 10, 40, 317000)
pyRete> assert_fact(1, ttl= 5)
# ==> Fact-1: 1 { Valid Until: 2007-05-15 22:10:56 }
pyRete> list_facts()
Facts:
Fact-1: 1 { Valid Until: 2007-05-15 22:10:56 }
pyRete> datetime.datetime.now()
datetime.datetime(2007, 5, 15, 22, 11, 1, 7000)
pyRete> list_facts()
# <== Fact-1: 1
Facts:
# None
pyRete> ^Z
[2007-05-16] Update: I just realized that Temporal Facts that have expired are not retracted, as they should be, just silently ignored. I'll fix that later today.
[2007-05-16] Update 2: Fixed!
Inga kommentarer:
Skicka en kommentar