Azure/azure-cosmos-python

ToArray()

Closed this issue · 6 comments

is not exactly idiomatic Python.

Saw the example here. http://azure.microsoft.com/en-us/documentation/articles/documentdb-python-application/

There should not be a need for such a method.

Also the naming convention does not meet Python. Please run this code through pep8.

Thanks for the feedback. We translated the Python SDK from other SDKs and tried to make it consistent with them, so it's not pythonic enough. I will discuss with the team and hopefully can change the naming convention in the new version.

Removed ToArray. Now you can use list(XXX) instead of XXX.ToArray()

No change to the naming convention for now. Our discussion result was that as long as it's consistent (with itself and other SDKs), it's OK. But I'm open to change it in the future if people ask.

@shipunyc what do you mean by other SDKs? Azure Python SDK's method names do comply with pep8. https://github.com/Azure/azure-sdk-for-python/blob/master/README.md

Will take a look at pep8 convention and hopefully make the Python SDK complaint with it. Reopening this so that we can track this.

@rnagpal great to hear, I hope it follows Python coding idioms completely; not just pep8.

Closing this issue due to age. Active development of our Python SDK has moved to https://github.com/Azure/azure-sdk-for-python. We have also released 4.0 which includes many updates and new features. If this issue still needs our attention, please reopen it in the new repository.