You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be useful to allow for doc string in classes made with chuck so that .help()'s features are consistent.
I'm not sure how this would look, but one option is to have python-style doc strings that are defined at the top of a class and class methods like this:
class Foo {
""" This is the class doc string """;
fun void Bar {
""" This is the function doc string """;
}
}
Something like this fairly simple and would be understood by people coming from python, but it doesn't seem very idiomatic with chuck.
Another options could be to add a doc function to this which would contextually supply a docstring to the class or function, like this:
class Foo {
this.doc("This is the class doc string");
fun void Bar {
this.doc("This is the function doc string";
}
}
However, this would require contextually different behaviors with this.doc which is kind of awkward and prone to confusion.
I don't think either of these ways would be the right approach for this, but they're a couple of ideas to get the ball rolling
The text was updated successfully, but these errors were encountered:
I think it would be useful to allow for doc string in classes made with chuck so that .help()'s features are consistent.
I'm not sure how this would look, but one option is to have python-style doc strings that are defined at the top of a class and class methods like this:
Something like this fairly simple and would be understood by people coming from python, but it doesn't seem very idiomatic with chuck.
Another options could be to add a doc function to
this
which would contextually supply a docstring to the class or function, like this:However, this would require contextually different behaviors with
this.doc
which is kind of awkward and prone to confusion.I don't think either of these ways would be the right approach for this, but they're a couple of ideas to get the ball rolling
The text was updated successfully, but these errors were encountered: