Changing the line:
>  subtypes = dict(zip(sstp, sst))
> to:
> subtypes = dict(zip(sst, sstp))
> as I believe Stephen misread it to be causes the zip operation to return:
> [('doctors', 'prescriptions'), ('patient', 'prescriptions')]
> and thus the dict will contain:
> {'patient': 'prescriptions', 'doctors': 'prescriptions'}
>
>
Whoops! You're absolutely right. I totally flipped the options to zip in my
head when eyeing it. I suppose I'm suffering from late-onset dyslexia. Ahem.

Yeah, I think the arguments to zip() were probably just flipped in Victor's
code. Unless he wants a result different then what I assume is expected. I
assume he's expecting {"doctors": "prescriptions", "patient":
"prescriptions"}. If instead its something more like {"prescriptions":
["doctors", "patient"]} then zip() isn't how to accomplish it.

--S
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to