Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExecuteQuery() function should always return a dict of lists #34

Open
sduenas opened this issue Jun 11, 2014 · 0 comments
Open

ExecuteQuery() function should always return a dict of lists #34

sduenas opened this issue Jun 11, 2014 · 0 comments

Comments

@sduenas
Copy link
Contributor

sduenas commented Jun 11, 2014

The behavior of ExecuteQuery() is not always the same. When the result of the query is just one element, the function returns a dict containing that element:

{'is_response_of': None, 'message_ID': '<[email protected]>'}

On the other hand, when the result is composed by many elements, it returns a dict of lists:

{'is_response_of': [None, '<[email protected]>'], 
'message_ID': ['<[email protected]>', '<[email protected]>']}

But, when the result is empty, ExecuteQuery() returns a dict of empty lists:

{'is_response_of': [], 'message_ID': []}

This function should always return the same type of objects to avoid errors accessing the results of the query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant