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

Setting Int to 0 or Float to 0.0 or String to '' won't be executed. #21

Open
barius opened this issue Apr 14, 2022 · 0 comments
Open

Setting Int to 0 or Float to 0.0 or String to '' won't be executed. #21

barius opened this issue Apr 14, 2022 · 0 comments

Comments

@barius
Copy link

barius commented Apr 14, 2022

idk if this is by-design but the following code will invalidate primitive types' false values.

    @value.setter
    def value(self, value):
        if value:
            self.set(value)

p.s.
Maybe this repo is no longer (actively) maintained, but I love the way that data structures in Python gets mapped to Redis in a Pythonic way. I'm trying to build an object mapping between Python and storage backends (e.g. Redis) and came across this project.

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

1 participant