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

Moving Constructor definition to the top like a Function definition #5103

Closed
ankit-maverick opened this issue Feb 12, 2014 · 5 comments · Fixed by #5285
Closed

Moving Constructor definition to the top like a Function definition #5103

ankit-maverick opened this issue Feb 12, 2014 · 5 comments · Fixed by #5285
Milestone

Comments

@ankit-maverick
Copy link

I would like to know if there is any specific reason for displaying the constructor definition at the bottom unlike a normal function definition. Currently it is less user-friendly to check up the default values of the arguments in the constructor. For example : scikit-image/scikit-image#885 (comment)

@Carreau Carreau added this to the 2.0 milestone Feb 12, 2014
@Carreau
Copy link
Member

Carreau commented Feb 12, 2014

Hum... even wondering if this is not a regression...
I'll mark as 2.0, but not sure it will make it through.

@takluyver
Copy link
Member

I don't think this is a regression - I think we've always printed the class docstring above the constructor info. We have to guess what is most likely to be useful to the user, and it's not clear that putting constructor info above the class docstring is better.

@Carreau
Copy link
Member

Carreau commented Feb 12, 2014

Oh, I read it was the constructor signature.

Maybe we can peek at which one have the less lines. If constructor have less lines, it is probably just info on the signature right ?

@takluyver
Copy link
Member

It is constructor signature in the example shown, but we group constructor info - docstring, signature, etc. - together.

@minrk
Copy link
Member

minrk commented Mar 6, 2014

#5285 makes the proposed change, and should improve the output for classes and callable objects

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

Successfully merging a pull request may close this issue.

4 participants