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

nfields works for AbstractTypes but fieldcount does not #25389

Closed
kdheepak opened this issue Jan 4, 2018 · 3 comments
Closed

nfields works for AbstractTypes but fieldcount does not #25389

kdheepak opened this issue Jan 4, 2018 · 3 comments

Comments

@kdheepak
Copy link
Contributor

kdheepak commented Jan 4, 2018

Screen Shot 2018-01-04 at 6.11.26 AM.png

@yuyichao
Copy link
Contributor

yuyichao commented Jan 4, 2018

This is expected. The answer nfields give is wrong. #22350

@yuyichao yuyichao closed this as completed Jan 4, 2018
@JeffBezanson
Copy link
Sponsor Member

Yes, this is why there's a deprecation. In the future nfields(x) will give the number of fields in the object x, which should work for all objects, and fieldcount(type) tries to determine the number of fields that an instance of the given type would have.

@kdheepak
Copy link
Contributor Author

kdheepak commented Jan 4, 2018

Thanks! I did look for other issues with fieldcount / nfields but must have missed that one.

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

3 participants