Skip to content

Commit bea5e6e

Browse files
authored
Update manual: Vararg{T,N} is not a type anymore (#39239)
1 parent 0e6ed75 commit bea5e6e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

base/docs/basedocs.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,8 +2357,8 @@ kw"::"
23572357
"""
23582358
Vararg{T,N}
23592359
2360-
The last parameter of a tuple type [`Tuple`](@ref) can be the special type `Vararg`, which denotes any
2361-
number of trailing elements. The type `Vararg{T,N}` corresponds to exactly `N` elements of type `T`.
2360+
The last parameter of a tuple type [`Tuple`](@ref) can be the special value `Vararg`, which denotes any
2361+
number of trailing elements. `Vararg{T,N}` corresponds to exactly `N` elements of type `T`. Finally
23622362
`Vararg{T}` corresponds to zero or more elements of type `T`. `Vararg` tuple types are used to represent the
23632363
arguments accepted by varargs methods (see the section on [Varargs Functions](@ref) in the manual.)
23642364

doc/src/manual/types.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,10 +916,11 @@ julia> isa(("1",1,2,3.0), mytupletype)
916916
false
917917
```
918918

919-
Notice that `Vararg{T}` corresponds to zero or more elements of type `T`. Vararg tuple types are
919+
Moreover `Vararg{T}` corresponds to zero or more elements of type `T`. Vararg tuple types are
920920
used to represent the arguments accepted by varargs methods (see [Varargs Functions](@ref)).
921921

922-
The type `Vararg{T,N}` corresponds to exactly `N` elements of type `T`. `NTuple{N,T}` is a convenient
922+
The special value `Vararg{T,N}` (when used as the last parameter of a tuple type)
923+
corresponds to exactly `N` elements of type `T`. `NTuple{N,T}` is a convenient
923924
alias for `Tuple{Vararg{T,N}}`, i.e. a tuple type containing exactly `N` elements of type `T`.
924925

925926
### Named Tuple Types

0 commit comments

Comments
 (0)