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

Exported type does not have attributes and python default functions. #270

Open
thatrandomperson5 opened this issue Aug 28, 2022 · 1 comment

Comments

@thatrandomperson5
Copy link

I have a type in nim

type PyHttpResponse = ref object of PyNimObjectExperimental
  content*: string
  status*: string
  headers*: TableRef[string, seq[string]]
  version*: string

But in python code when I try to do the below it does not work:

instance.__dict__ #PyHttpResponse python instance
instance.content

Why is this?

@yglukhov
Copy link
Owner

yglukhov commented May 1, 2023

Exporting fields (attributes) is not supported by nimpy currently. Maybe it will be in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants