-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Documentation for Dict.__init__()
constructor arguments is not clear
#294
Comments
From the description I still cannot grasp what a "container" is, for a dict: is it's "values"? Also it does not explain why "certain keys"? So would you mean something like this (sorry, I'm still lost)?
|
I'm always lost here :-( |
Sorry, @ankostis! I'll take another swing at the docstring (#350). The dict is the container. The terminology comes from Python, where the base container types are dict, list, tuple, set. In this case, the contents of the container are its values. One thing that's definitely not clear yet: keys are never validated (hence #306), only values. |
Thanks for the tip on the "container" meaning! |
Currently the documentation of the
Dict.__init__()
constructor explains its arguments with the following wording:From that, I cannot understand what is the
trait
and thetraits
keywords.Particularly confusing is the term "Container"; a
dict
contains both keys and values.Is one of the referring to the type of the dictionary keys and the other to the dictionary values?
Can it be improved to clarify this distinction? Or maybe add a usage example?
My apologies for this "support" thread,
The text was updated successfully, but these errors were encountered: