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

have a default prefix, check prefix to prevent downstream issues #5

Open
JunAishima opened this issue Feb 15, 2024 · 1 comment
Open

Comments

@JunAishima
Copy link
Contributor

Having an undefined, or user-set None for prefix will cause problems with the current code. Suggest adding some validation and a default value.

(line 29 of redis_json_dict.py): prefix_len = len(self._prefix)

@danielballan
Copy link
Contributor

danielballan commented Feb 16, 2024

Undefined cannot happen, as prefix is a required argument for instantiation.

I considered that the only reasonable default would be "", and by providing no default, the user is forced to choose a prefix and in that moment consider what would best avoid key collisions in their application.

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