Update DDist.py

Sample Implementation:

Given:
Weather is an instance of DDist representing the distribution Pr(W), with support ['rain','sun'].
ActivityGivenWeather is a procedure representing the conditional distribution Pr(A|W).
QuantumGivenActivity is a procedure representing the conditional distribution Pr(Q|A).

Then:
pRainGivenComputer = Weather.bayesianUpdate(ActivityGivenWeather,'computer').prob('rain')

PWA = makeJointDistribution(Weather, ActivityGivenWeather)
newD = {}
PA = PWA.project(lambda x: x[1])
def QgWA((w,a)):
    return QuantumGivenActivity(a)
prePWAQ = makeJointDistribution(PWA,QgWA)
WeatherAndActivityAndQuantum = prePWAQ.project(lambda ((w,a),q): (w,a,q))

pSunAndOutside = PWA.prob(('sun','outside'))

pComputer = PA.prob('computer')

PWQ = WeatherAndActivityAndQuantum.project(lambda(w,a,q): (w,q))
PQ = PWQ.project(lambda x: x[1])
pRainGivenKeyboard = PWQ.prob(('rain','keyboard'))/PQ.prob('keyboard')

pRainGivenBed = PWQ.prob(('rain','bed'))/PQ.prob('bed')