Skip to content

Commit 93d375c

Browse files
authored
doc: drop colon from "See also" sentences (#40401)
We generally seem to prefer sentences over keyword lists (which feel a bit too much like Javadoc to me), so this changes the documentation to use a more free-form sentence for "see also," including an ending period (we seem to have intuitively preferred this already, by a ratio of 5:2).
1 parent 5dbf45a commit 93d375c

File tree

33 files changed

+99
-99
lines changed

33 files changed

+99
-99
lines changed

base/abstractarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,7 @@ mapany(f, itr) = Any[f(x) for x in itr]
27402740
Transform collection `c` by applying `f` to each element. For multiple collection arguments,
27412741
apply `f` elementwise, and stop when when any of them is exhausted.
27422742
2743-
See also: [`map!`](@ref), [`foreach`](@ref), [`mapreduce`](@ref), [`mapslices`](@ref), [`zip`](@ref), [`Iterators.map`](@ref).
2743+
See also [`map!`](@ref), [`foreach`](@ref), [`mapreduce`](@ref), [`mapslices`](@ref), [`zip`](@ref), [`Iterators.map`](@ref).
27442744
27452745
# Examples
27462746
```jldoctest

base/array.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ function zeros end
499499
ones([T=Float64,] dims...)
500500
501501
Create an `Array`, with element type `T`, of all ones with size specified by `dims`.
502-
See also: [`fill`](@ref), [`zeros`](@ref).
502+
See also [`fill`](@ref), [`zeros`](@ref).
503503
504504
# Examples
505505
```jldoctest

base/char.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,19 @@ end
108108
ismalformed(c::AbstractChar) -> Bool
109109
110110
Return `true` if `c` represents malformed (non-Unicode) data according to the
111-
encoding used by `c`. Defaults to `false` for non-`Char` types. See also
112-
[`show_invalid`](@ref).
111+
encoding used by `c`. Defaults to `false` for non-`Char` types.
112+
113+
See also [`show_invalid`](@ref).
113114
"""
114115
ismalformed(c::AbstractChar) = false
115116

116117
"""
117118
isoverlong(c::AbstractChar) -> Bool
118119
119120
Return `true` if `c` represents an overlong UTF-8 sequence. Defaults
120-
to `false` for non-`Char` types. See also [`decode_overlong`](@ref)
121-
and [`show_invalid`](@ref).
121+
to `false` for non-`Char` types.
122+
123+
See also [`decode_overlong`](@ref) and [`show_invalid`](@ref).
122124
"""
123125
isoverlong(c::AbstractChar) = false
124126

base/div.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ an integer according to the rounding mode `r`. In other words, the quantity
1212
1313
without any intermediate rounding.
1414
15-
See also: [`fld`](@ref), [`cld`](@ref) which are special cases of this function
15+
See also [`fld`](@ref) and [`cld`](@ref), which are special cases of this function.
1616
1717
# Examples:
1818
```jldoctest
@@ -88,7 +88,7 @@ rem(x::Integer, y::Integer, r::RoundingMode{:Nearest}) = divrem(x, y, r)[2]
8888
8989
Largest integer less than or equal to `x/y`. Equivalent to `div(x, y, RoundDown)`.
9090
91-
See also: [`div`](@ref), [`cld`](@ref), [`fld1`](@ref).
91+
See also [`div`](@ref), [`cld`](@ref), [`fld1`](@ref).
9292
9393
# Examples
9494
```jldoctest
@@ -122,7 +122,7 @@ fld(a, b) = div(a, b, RoundDown)
122122
123123
Smallest integer larger than or equal to `x/y`. Equivalent to `div(x, y, RoundUp)`.
124124
125-
See also: [`div`](@ref), [`fld`](@ref).
125+
See also [`div`](@ref), [`fld`](@ref).
126126
127127
# Examples
128128
```jldoctest

base/initdefs.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ Here is an overview of some of the subdirectories that may exist in a depot:
8181
* `packages`: Contains packages, some of which were explicitly installed and some which are implicit dependencies. Maintained by `Pkg.jl`.
8282
* `registries`: Contains package registries. By default only `General`. Maintained by `Pkg.jl`.
8383
84-
See also:
85-
[`JULIA_DEPOT_PATH`](@ref JULIA_DEPOT_PATH), and
84+
See also [`JULIA_DEPOT_PATH`](@ref JULIA_DEPOT_PATH), and
8685
[Code Loading](@ref code-loading).
8786
"""
8887
const DEPOT_PATH = String[]
@@ -161,7 +160,7 @@ have special meanings:
161160
The fully expanded value of `LOAD_PATH` that is searched for projects and packages
162161
can be seen by calling the `Base.load_path()` function.
163162
164-
See also:
163+
See also
165164
[`JULIA_LOAD_PATH`](@ref JULIA_LOAD_PATH),
166165
[`JULIA_PROJECT`](@ref JULIA_PROJECT),
167166
[`JULIA_DEPOT_PATH`](@ref JULIA_DEPOT_PATH), and

base/intfuncs.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,8 @@ Factorial of `n`. If `n` is an [`Integer`](@ref), the factorial is computed as a
953953
integer (promoted to at least 64 bits). Note that this may overflow if `n` is not small,
954954
but you can use `factorial(big(n))` to compute the result exactly in arbitrary precision.
955955
956+
See also [`binomial`](@ref).
957+
956958
# Examples
957959
```jldoctest
958960
julia> factorial(6)
@@ -967,9 +969,6 @@ julia> factorial(big(21))
967969
51090942171709440000
968970
```
969971
970-
# See also
971-
* [`binomial`](@ref)
972-
973972
# External links
974973
* [Factorial](https://en.wikipedia.org/wiki/Factorial) on Wikipedia.
975974
"""
@@ -999,6 +998,8 @@ If ``n`` is negative, then it is defined in terms of the identity
999998
\\binom{n}{k} = (-1)^k \\binom{k-n-1}{k}
1000999
```
10011000
1001+
See also [`factorial`](@ref).
1002+
10021003
# Examples
10031004
```jldoctest
10041005
julia> binomial(5, 3)
@@ -1011,9 +1012,6 @@ julia> binomial(-5, 3)
10111012
-35
10121013
```
10131014
1014-
# See also
1015-
* [`factorial`](@ref)
1016-
10171015
# External links
10181016
* [Binomial coefficient](https://en.wikipedia.org/wiki/Binomial_coefficient) on Wikipedia.
10191017
"""

base/io.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ end
10341034
10351035
Return an iterable object yielding [`read(io, T)`](@ref).
10361036
1037-
See also: [`skipchars`](@ref), [`eachline`](@ref), [`readuntil`](@ref)
1037+
See also [`skipchars`](@ref), [`eachline`](@ref), [`readuntil`](@ref).
10381038
10391039
!!! compat "Julia 1.6"
10401040
`readeach` requires Julia 1.6 or later.

base/iterators.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ CartesianIndex(1, 2) d
221221
CartesianIndex(2, 2) e
222222
```
223223
224-
See also: [`IndexStyle`](@ref), [`axes`](@ref).
224+
See also [`IndexStyle`](@ref), [`axes`](@ref).
225225
"""
226226
pairs(::IndexLinear, A::AbstractArray) = Pairs(A, LinearIndices(A))
227227
pairs(::IndexCartesian, A::AbstractArray) = Pairs(A, CartesianIndices(axes(A)))
@@ -1338,7 +1338,7 @@ length(s::Stateful) = length(s.itr) - s.taken
13381338
Returns the one and only element of collection `x`, and throws an `ArgumentError` if the
13391339
collection has zero or multiple elements.
13401340
1341-
See also: [`first`](@ref), [`last`](@ref).
1341+
See also [`first`](@ref), [`last`](@ref).
13421342
13431343
!!! compat "Julia 1.4"
13441344
This method requires at least Julia 1.4.

base/libc.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Suspends execution for `s` seconds.
131131
This function does not yield to Julia's scheduler and therefore blocks
132132
the Julia thread that it is running on for the duration of the sleep time.
133133
134-
See also: [`sleep`](@ref)
134+
See also [`sleep`](@ref).
135135
"""
136136
systemsleep
137137

base/mpfr.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ global precision; `convert` will always return `x`.
151151
convenience since decimal literals are converted to `Float64` when parsed, so
152152
`BigFloat(2.1)` may not yield what you expect.
153153
154+
See also:
155+
- [`@big_str`](@ref)
156+
- [`rounding`](@ref) and [`setrounding`](@ref)
157+
- [`precision`](@ref) and [`setprecision`](@ref)
158+
154159
!!! compat "Julia 1.1"
155160
`precision` as a keyword argument requires at least Julia 1.1.
156161
In Julia 1.0 `precision` is the second positional argument (`BigFloat(x, precision)`).
@@ -169,11 +174,6 @@ julia> BigFloat("2.1", RoundUp)
169174
julia> BigFloat("2.1", RoundUp, precision=128)
170175
2.100000000000000000000000000000000000007
171176
```
172-
173-
# See also
174-
- [`@big_str`](@ref)
175-
- [`rounding`](@ref) and [`setrounding`](@ref)
176-
- [`precision`](@ref) and [`setprecision`](@ref)
177177
"""
178178
BigFloat(x, r::RoundingMode)
179179

0 commit comments

Comments
 (0)