-
Notifications
You must be signed in to change notification settings - Fork 216
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
[] should evaluate to an empty list, not any list #198
Comments
I also agree with you here. One problem which I could think is the backward compatibility loss in here. |
Yes, agreed. I don't think there is a significant issue with backwards compatibility, as even following the description of how |
@tuukkamustonen : Please submit the PR for the same. If you need any help, reach out to us. |
Should we also change If one wants to define a free-form dict:
That would break backwards-compatibility but would maybe make logic even more coherent (classes evaluated as types, instances evaluate as exact... except non-empty dict). @alecthomas @tusharmakkar08 What do you think? |
Agree on this. It would make voluptuous more consistent. |
@tuukkamustonen : Are you working on PR for this issue? |
@tusharmakkar08: Not yet, but I'll take a look at it today... |
Wouldn't it be logical to evaluate
list
for any list and[]
for an exact value (an empty list)?The text was updated successfully, but these errors were encountered: