JuliaLang / Compat.jl

Compatibility across Julia versions
Other
145 stars 117 forks source link

Define range(::Number, ::Number) instead of overwriting Base #649

Closed fredrikekre closed 5 years ago

fredrikekre commented 5 years ago

Define range(::Number, ::Number) instead of overwriting the (::Any, ::Any) method in base, fixes #648.

nalimilan commented 5 years ago

This won't work for e.g. Dates, but I guess that's OK. We could also define a function for them.

martinholters commented 5 years ago

IIRC only ONNX had been seen in the wild using this. But I don't know whether it uses anything else than numbers.

fredrikekre commented 5 years ago

IIUC this method should not be called anyway, ref #640 and perhaps this is good enough then?