Skip to content

Commit af51890

Browse files
committed
Document AbstractDict and AbstractSet
1 parent 215a5c9 commit af51890

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

base/essentials.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,20 @@ const Callable = Union{Function,Type}
66

77
const Bottom = Union{}
88

9+
"""
10+
AbstractSet{T}
11+
12+
Supertype for set-like types whose elements are of type `T`.
13+
[`Set`](@ref), [`BitSet`](@ref) and other types are subtypes of this.
14+
"""
915
abstract type AbstractSet{T} end
16+
17+
"""
18+
AbstractDict{K, V}
19+
20+
Supertype for dictionary-like types with keys of type `K` and values of type `V`.
21+
[`Dict`](@ref), [`IdDict`](@ref) and other types are subtypes of this.
22+
"""
1023
abstract type AbstractDict{K,V} end
1124

1225
# The real @inline macro is not available until after array.jl, so this

doc/src/base/collections.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Fully implemented by:
4040
* `Number`
4141
* [`AbstractArray`](@ref)
4242
* [`BitSet`](@ref)
43+
* [`Dict`](@ref)
4344
* [`IdDict`](@ref)
4445
* [`Dict`](@ref)
4546
* [`WeakKeyDict`](@ref)
@@ -191,6 +192,7 @@ for the key `x`). Multiple arguments to `D[...]` are converted to tuples; for e
191192
`D[x,y]` is equivalent to `D[(x,y)]`, i.e. it refers to the value keyed by the tuple `(x,y)`.
192193

193194
```@docs
195+
Base.AbstractDict
194196
Base.Dict
195197
Base.IdDict
196198
Base.WeakKeyDict
@@ -233,6 +235,7 @@ Partially implemented by:
233235
## Set-Like Collections
234236

235237
```@docs
238+
Base.AbstractSet
236239
Base.Set
237240
Base.BitSet
238241
Base.union

doc/src/manual/conversion-and-promotion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ already of the requested type:
194194
convert(::Type{T}, x::T) where {T<:Number} = x
195195
```
196196

197-
Similar definitions exist for `AbstractString`, `AbstractArray`, and `AbstractDict`.
197+
Similar definitions exist for `AbstractString`, [`AbstractArray`](@ref), and [`AbstractDict`](@ref).
198198

199199
## Promotion
200200

0 commit comments

Comments
 (0)