Q3 on final exam

This one got me :flushed: So I want to give few hints without giving answer away.

Hint 1. Do not use Pymongo documentation for finding “default values”. Apparently there are two notations for the host. And for some fields the default value is different if you use the Standard Connection String Format or the DNS Seedlist Connection Format.

Hint 2. For the key-word arguments (kwargs) the default value is not shown for the output. Only main parameters is shown by MongoClient.stats

Question. I was not able to evoke this method (MongoClient.stats) both in Mongo Shell and Python program. Nor I could find the description of it in the documentations. Any links?

PS Question 3 is only one I failed. So I already know the correct answer. But I would like to read up on the mc.stats. Thanks.

@torus_ot is this question to do with interpreting the mc connection object? It might have changed since I took this course that’s why I ask.

If it is, then an important point was mentioned in this lecture and the rest of the answers are a matter of interpreting the properties of the connection string and match that to the options given.

I am able to invoke the method in Python shell using the following code:

Make sure you have uri parameter correctly set and using the compatible versions. :slight_smile:

Kanika