JuliaLang/julia
Ver no GitHubStable API to strip type parameters from type
Open
#35.543 aberto em 21 de abr. de 2020
featurehelp wanted
Métricas do repositório
- Stars
- (48.709 stars)
- Métricas de merge de PR
- (Mesclagem média 20d 6h) (157 fundiu PRs em 30d)
Description
Is there a function to strip the type parameters from a type? For example:
strip_type_parameters(Array{Int,3}) # should return Array
There is one way to do this but it is not documented (pointed out by @jakobnissen):
strip_type_parameters(T) = Base.typename(T).wrapper
Therefore in principle it can change in future versions.
Why not have a stable API for this?