-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
valtype
should fallback to eltype
#58081
Comments
Hmmm. Technically, aren’t Seems to me it might make more sense to leave |
|
Oh, wait. The suggestion in the OP is consistent with the fact that Lines 1111 to 1133 in bd193e4
The doc string even says:
|
Nice find! That’s probably the best argument for this I think |
I want to use
valtype
andkeytype
as a generic way of getting the value type and index type for a collection—and have the operation be compatible with dict-like collections. It seems some parts of this interface are missing so it would be nice to add fallbacks.The
valtype
docstring says:Based on this I would have guessed that
valtype
would fallback toeltype
so that it can be compatible with any collection. Right now you run into things likewhich hurts the general use of this function.
The text was updated successfully, but these errors were encountered: