Skip to content

Commit 29cf874

Browse files
committed
Fixed up docs for changed dump function.
For JuliaLang#15707. In addition: * Some commented out code referring to `xdump` was removed from `base/show.jl`. * `doc/stdlib/arrays.rst` was updated from building docs.
1 parent 005bb21 commit 29cf874

File tree

4 files changed

+9
-19
lines changed

4 files changed

+9
-19
lines changed

base/show.jl

+1-5
Original file line numberDiff line numberDiff line change
@@ -1036,11 +1036,7 @@ function dump(io::IO, x::DataType, n::Int, indent)
10361036
for idx in 1:length(fields)
10371037
println(io)
10381038
print(io, indent, " ", fields[idx], "::")
1039-
#if isa(x.types[idx], DataType)
1040-
# xdump(fn, io, fieldtype(x,idx), n - 1, string(indent, " "))
1041-
#else
1042-
print(io, fieldtype(x,idx))
1043-
#end
1039+
print(io, fieldtype(x,idx))
10441040
end
10451041
end
10461042
end

doc/devdocs/types.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Let's look at these types a little more closely:
9090
julia> Array
9191
Array{T,N}
9292

93-
julia> xdump(Array)
93+
julia> dump(Array)
9494
Array{T,N}::DataType <: DenseArray{T,N}
9595

9696
This indicates that :obj:`Array` is a shorthand for ``Array{T,N}``. If
@@ -104,7 +104,7 @@ parameters:
104104
julia> T,N = Array.parameters
105105
svec(T,N)
106106

107-
julia> xdump(T)
107+
julia> dump(T)
108108
TypeVar
109109
name: Symbol T
110110
lb: Union{}
@@ -133,7 +133,7 @@ one can extract the underlying :obj:`TypeVar`:
133133
m = start(methods(g))
134134
p = m.sig.parameters
135135
tv = p[1]
136-
xdump(tv)
136+
dump(tv)
137137

138138
.. testoutput:: s
139139

@@ -169,14 +169,14 @@ parameters. For example:
169169
julia> p3 = start(methods(h3)).sig.parameters
170170
svec(Array{T<:Real,N},T<:Real)
171171

172-
julia> xdump(p1[1].parameters[1])
172+
julia> dump(p1[1].parameters[1])
173173
TypeVar
174174
name: Symbol T
175175
lb: Union{}
176176
ub: Any::DataType <: Any
177177
bound: Bool false
178178

179-
julia> xdump(p3[1].parameters[1])
179+
julia> dump(p3[1].parameters[1])
180180
TypeVar
181181
name: Symbol T
182182
lb: Union{}
@@ -310,7 +310,7 @@ the type, which is an object of type :obj:`TypeName`:
310310

311311
.. doctest::
312312

313-
julia> xdump(Array.name)
313+
julia> dump(Array.name)
314314
TypeName
315315
name: Symbol Array
316316
module: Module Core

doc/stdlib/arrays.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ Constructors
227227

228228
.. Docstring generated from Julia source
229229
230-
Create an array with the same data as the given array, but with different dimensions. An implementation for a particular type of array may choose whether the data is copied or shared.
230+
Create an array with the same data as the given array, but with different dimensions.
231231

232232
.. function:: similar(array, [element_type=eltype(array)], [dims=size(array)])
233233

doc/stdlib/io-network.rst

+1-7
Original file line numberDiff line numberDiff line change
@@ -511,13 +511,7 @@ Text I/O
511511

512512
.. Docstring generated from Julia source
513513
514-
Show all user-visible structure of a value.
515-
516-
.. function:: xdump(x)
517-
518-
.. Docstring generated from Julia source
519-
520-
Show all structure of a value, including all fields of objects.
514+
Show every part of the representation of a value.
521515

522516
.. function:: readstring(stream::IO)
523517
readstring(filename::AbstractString)

0 commit comments

Comments
 (0)