Re-use more of the from_doc constructor and attribute type transformation in the Result object. Restore Pod.subpods through an alias property.

This commit is contained in:
Jason R. Coombs
2016-09-03 14:56:06 -04:00
parent 273cd73330
commit 1a4dc2fc62
2 changed files with 13 additions and 6 deletions
+2 -2
View File
@@ -23,11 +23,11 @@ Result objects have `pods` (a Pod is an answer group from Wolfram Alpha)::
for pod in res.pods:
do_something_with(pod)
Pod objects have `subpods` (a Subpod is a specific response with the plaintext
Pod objects have ``subpods`` (a Subpod is a specific response with the plaintext
reply and some additional info)::
for pod in res.pods:
for sub in pod.subpod:
for sub in pod.subpods:
print(sub.text)
You may also query for simply the pods which have 'Result' titles or are