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 .raw attribute to high-level objects #418

Open
delivrance opened this issue Jun 11, 2020 · 1 comment
Open

Add .raw attribute to high-level objects #418

delivrance opened this issue Jun 11, 2020 · 1 comment

Comments

@delivrance
Copy link
Member

@delivrance delivrance commented Jun 11, 2020

Similarly to _client (which is currently undocumented and used for internal purposes only), we can add a raw attribute to get each object's raw representation.

So far no real use case needs this, but could be nice to have. We need to look at the memory consumption too since raw objects are also kept around. Maybe save raw bytes instead and deserialize on the fly?

@JosXa
Copy link
Contributor

@JosXa JosXa commented Sep 29, 2020

Couldn't all custom objects' attributes become properties that read from self.raw instead? As far as I've seen (please correct me) a custom object always gets "copied" from raw ones including all attributes. If we save on that step and replace the copying with property access, then there's no memory overhead and possibly even an advantage with regards to CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.