Skip to content

Commit efab5e5

Browse files
committed
Delete unnecessary comparison operators
These are already defined by Base in terms of other comparison operators, so they cause a ton of invalidations.
1 parent 6f3d45e commit efab5e5

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/Core/Py.jl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -364,30 +364,21 @@ Base.broadcastable(x::Py) = Ref(x)
364364

365365
# comparisons
366366
Base.:(==)(x::Py, y::Py) = pyeq(x, y)
367-
Base.:(!=)(x::Py, y::Py) = pyne(x, y)
368367
Base.:(<=)(x::Py, y::Py) = pyle(x, y)
369368
Base.:(<)(x::Py, y::Py) = pylt(x, y)
370-
Base.:(>=)(x::Py, y::Py) = pyge(x, y)
371-
Base.:(>)(x::Py, y::Py) = pygt(x, y)
372369
Base.isless(x::Py, y::Py) = pylt(Bool, x, y)
373370
Base.isequal(x::Py, y::Py) = pyeq(Bool, x, y)
374371

375372
# we also allow comparison with numbers
376373
Base.:(==)(x::Py, y::Number) = pyeq(x, y)
377-
Base.:(!=)(x::Py, y::Number) = pyne(x, y)
378374
Base.:(<=)(x::Py, y::Number) = pyle(x, y)
379375
Base.:(<)(x::Py, y::Number) = pylt(x, y)
380-
Base.:(>=)(x::Py, y::Number) = pyge(x, y)
381-
Base.:(>)(x::Py, y::Number) = pygt(x, y)
382376
Base.isless(x::Py, y::Number) = pylt(Bool, x, y)
383377
Base.isequal(x::Py, y::Number) = pyeq(Bool, x, y)
384378

385379
Base.:(==)(x::Number, y::Py) = pyeq(x, y)
386-
Base.:(!=)(x::Number, y::Py) = pyne(x, y)
387380
Base.:(<=)(x::Number, y::Py) = pyle(x, y)
388381
Base.:(<)(x::Number, y::Py) = pylt(x, y)
389-
Base.:(>=)(x::Number, y::Py) = pyge(x, y)
390-
Base.:(>)(x::Number, y::Py) = pygt(x, y)
391382
Base.isless(x::Number, y::Py) = pylt(Bool, x, y)
392383
Base.isequal(x::Number, y::Py) = pyeq(Bool, x, y)
393384

0 commit comments

Comments
 (0)