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

Add docs describing output type of parse #63

Open
jmetz opened this issue Jan 22, 2021 · 2 comments
Open

Add docs describing output type of parse #63

jmetz opened this issue Jan 22, 2021 · 2 comments

Comments

@jmetz
Copy link

jmetz commented Jan 22, 2021

While the docs outline the most basic usage, I was trying to put the try-except for the call to parse inside a proc and return the result... but have no not been able to do better than return a ref untyped.

I see an issue referring to an OptsArgparse type when I used the wrong type, but OptsArgparse isn't defined either.

Could you provide guidance (and ideally docs) on what the return of parse is?

@jmetz jmetz changed the title Add docs explaining how to use output of parse Add docs descriing output type of parse Jan 22, 2021
@jmetz jmetz changed the title Add docs descriing output type of parse Add docs describing output type of parse Jan 22, 2021
@iffy
Copy link
Owner

iffy commented Jan 25, 2021

@jmetz at this point, ref untyped is likely the best you can do. I've been annoyed by this limitation a few times, too.

I almost succeeded in getting argparse to generate a consistent type name for the data returned by parse but was prevented by this bug: nim-lang/Nim#16118 I'll see if it's still an issue in the latest Nim.

@jmetz
Copy link
Author

jmetz commented Jan 25, 2021

Thanks @iffy - I had wondered if that might be a current language limitation/bug.
For now I'll just be careful and make do with a void pointer 😅

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