diff --git a/wolframalpha/__init__.py b/wolframalpha/__init__.py index 60c22b9..0a5e0b7 100644 --- a/wolframalpha/__init__.py +++ b/wolframalpha/__init__.py @@ -71,14 +71,6 @@ class Result(object): template = 'Error {code}: {msg}' raise Exception(template.format(code=code, msg=msg)) - def _flatten(self, lists): - ''' - src: http://stackoverflow.com/a/952952/4241708 - usr: intuited - ''' - from itertools import chain - return list(chain.from_iterable(lists)) - def __iter__(self): return iter(self.info) @@ -88,7 +80,7 @@ class Result(object): @property def results(self): ''' Get the response to a simple, discrete query. ''' - return self._flatten([pod.details for pod in self.pods if pod.primary or pod.title=='Result']) + return [pod for pod in self.pods if pod.primary or pod.title=='Result'] @property def details(self):