Documentation example uses un-necessary wizardry?

In the manual we see this code:

we see:

    def __call__(self):
        return self.title + ": " + str(self.a + self.b)

for both the normal and Param class.

What if the person doesnt know what __call()__ does? Why use call for this when the more common method to use is __str()__? Or if you want to be user-friendly, then call it my_name since I believe name is not available for parameters in Param?

I think there’s already been some users reporting that the usage of __call__ was a little confusing, so thanks for raising that again. If you’ve got ideas to improve the user guide, feel free to open an issue on Param’s issue tracker or even better a PR :slight_smile:

Or if you want to be user-friendly, then call it my_name since I believe name is not available for parameters in Param?

What are you referring to? I couldn’t find any occurrence of name in this page.

yes I know. But what I’m saying is that object.name() or object.name is a far more user-friendly and expressive way to call the object than object(). But name cannot be used as an attribute in param so I was suggesting my_name instead.