Hover documentation for __init__() function

In python, when typing the name of the class, if I hover over the class name, the docstring from the Class will display until I add the open parenthesis, at which point the help docstring will switch to the Class’s init function. In Mojo I still don’t know how to display the doctring for the init function. It always displays the struct’s docstring. Is this the desired behavior or has this just been overlooked up to this point?

If this is the desired behavior, it would be good to know (I see the stdlib gets around this issue by putting lots of example code in the main docstring), so that we can adjust how we are approaching documentation in our library, as we have different init arguments for each of our structs.

Thanks!

Sam

1 Like