Julia: Help regression for Rational in 0.6

Created on 22 Apr 2017  ·  3Comments  ·  Source: JuliaLang/julia

In Julia 0.5:

help?> Rational
search: Rational rationalize Irrational SerializationState permutations

  No documentation found.

  Summary:

  immutable Rational{T<:Integer} <: Real

  Fields:

  num :: T<:Integer
  den :: T<:Integer

while in Julia 0.6

help?> Rational
search: Rational rationalize Irrational SerializationState Factorization

  No documentation found.

  Base.Rational is of type UnionAll.

  Summary:

  struct UnionAll <: Type{T}

  Fields:

  var  :: TypeVar
  body :: Any

The details in 0.6 are wrong:

julia> Rational <: UnionAll
false

julia> fieldnames(Rational)
2-element Array{Symbol,1}:
 :num
 :den

Most helpful comment

Maybe Rational should just be documented...

All 3 comments

What the doc is actually saying is that

julia> isa(Rational, UnionAll)
true

Not that it's particularly useful/unconfusing...

See #21029.

Maybe Rational should just be documented...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yurivish picture yurivish  ·  3Comments

StefanKarpinski picture StefanKarpinski  ·  3Comments

arshpreetsingh picture arshpreetsingh  ·  3Comments

tkoolen picture tkoolen  ·  3Comments

manor picture manor  ·  3Comments