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

Make Request inherit from dict, to store user data in a separate dedicated space #33

Merged
merged 1 commit into from Nov 27, 2017

Conversation

2 participants
@yohanboniface
Member

yohanboniface commented Nov 26, 2017

I see no impact on the benchmarks.

@yohanboniface yohanboniface requested a review from davidbgk Nov 26, 2017

## How to store custom data in the request
You can use `Request` as a `dict` like object for your own use, `Roll` itself
never touch it.

This comment has been minimized.

@davidbgk

davidbgk Nov 26, 2017

Contributor

Touches

@davidbgk

This comment has been minimized.

Contributor

davidbgk commented Nov 26, 2017

I think it impacts memory consumption. Is __slots__ still necessary in that case?

@yohanboniface

This comment has been minimized.

Member

yohanboniface commented Nov 26, 2017

I think it impacts memory consumption.

Why would that consume more memory than the previous kwargs?

Is slots still necessary in that case?

I'd say at least to keep the separation between Roll space (attributes) and user space (dict keys).

@yohanboniface yohanboniface merged commit 2b78503 into master Nov 27, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@yohanboniface yohanboniface deleted the request-custom branch Nov 27, 2017

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