Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class methods with a dot show an underscore instead of dot in the documentation. #82

Closed
dullin opened this issue Nov 21, 2018 · 4 comments

Comments

@dullin
Copy link
Contributor

dullin commented Nov 21, 2018

I'm using a Property Get Method where the method declaration looks like :
function out = get.PropertyName(obj)

When rendering the pdf of a method name with a dot, the documentation shows an underscore instead. The previous example would show as get_PropertyName.

@joeced
Copy link
Collaborator

joeced commented Nov 21, 2018

Thanks for the report. Apparently, this is intentional. In

if meth.name.split('.')[0] in ['get', 'set']:
set/get methods get the dot replaced with an underscore. It looks like it has something to do with name lookup. I'll see if I can change the behavior to the the proper dot.,

@joeced
Copy link
Collaborator

joeced commented Jan 10, 2019

@dullin I have now investigated this, and actually I'm not sure if they should be documented. MATLAB does not show any documentation strings for get/set methods, and according to https://se.mathworks.com/matlabcentral/answers/411344-why-doesn-t-the-methods-command-display-set-property-and-get-property-methods-of-a-class-what, this is expected behavior.

So, the question is, if we should actually document them at all. I could add behavior to actually skip these methods. Do you have an opinion on this.

@dullin
Copy link
Contributor Author

dullin commented Jan 11, 2019

I think skipping them is actually the right call in this case. Any documentation that was in the get/set methods would just be relegated to the property description instead. That makes sense since, like it was put forward, the methods themselves aren't callable.

@joeced
Copy link
Collaborator

joeced commented Feb 2, 2019

@joeced joeced closed this as completed Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants