cwm BUG: experience global doesn't work from rdfn3bot.py application

Global variables are evil...

DEBUG: from::DanC_!~connolly@tux.w3.org|message::['PRIVMSG',
'#rdfbot']|text::swBot, this log:forAll :x. { <foo> log:resolvesTo :x }
log:implies { [:x_is :x]}?
error: uncaptured python exception, closing channel <T connected at
81915ec> (exceptions.NameError:There is no variable named 'experience'
[/usr/lib/python2.0/asyncore.py|poll|96]
[/usr/lib/python2.0/asyncore.py|handle_read_event|348]
[/usr/lib/python2.0/asynchat.py|handle_read|131]
[ircAsync.py|found_terminator|123] [ircAsync.py|rxdMsg|151]
[rdfn3chat.py|doQuery|231]
[/home/connolly/w3ccvs/WWW/2000/10/swap/cwm.py|applyRules|1463]
[/home/connolly/w3ccvs/WWW/2000/10/swap/cwm.py|tryRule|1531]
[/home/connolly/w3ccvs/WWW/2000/10/swap/cwm.py|match|1838]
[/home/connolly/w3ccvs/WWW/2000/10/swap/cwm.py|query|2049]
[/home/connolly/w3ccvs/WWW/2000/10/swap/cwm.py|evaluateObject2|649])

the offending code is:

class BI_resolvesTo(HeavyBuiltIn, Function):
    def evaluateObject2(self, store, subj):
        if isinstance(subj, Fragment): doc = subj.resource
        else: doc = subj
        F = store.any((experience, store.resolvesTo, doc, None))
        if F: return F

	...

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Thursday, 30 August 2001 14:18:00 UTC