-
Notifications
You must be signed in to change notification settings - Fork 31
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
Too many values to unpack #112
Comments
Thanks your report!
As you know, there is no good default to merge a string with a list. In your case, I think it would be better if the later one is like |
Thanks for your feedback. In this case it is not possible to refactor the later one because it is parsed from user input. But you are right, if the in put is malformed I should through an exception instead of some magic :) |
Although I still believe anyconfig should not behave too 'smart' and hide any some unexpected cases it should not process originally, I changed my mind and think that it might be useful if the following merge strategies are available in anyconfig:
How do you think about this? If you like this idea and want, I'll try to implement those merge strategies. |
@ssato sorry for the late respons. I guess, having a merge strategy to handle such cases would be cool. How does these two described strategies handles current options for list append and dict merge? |
Hi,
I try to merge some nested dicts like this:
... 'minio_prefix': {'value': {'minio_prefix': 'aaa'}} ...
with... ''minio_prefix': {'value': ['_unset_']} ...
but get an exception:Any suggestions how to work around it? If there is a type conflict like in this case (value: dict should be merged with value: list) I would expect a fallback to simply override it.
The text was updated successfully, but these errors were encountered: