@@ -369,19 +369,6 @@ Base.:(<)(x::Py, y::Py) = pylt(Bool, x, y)
369369Base. isless (x:: Py , y:: Py ) = pylt (Bool, x, y)
370370Base. isequal (x:: Py , y:: Py ) = pyeq (Bool, x, y)
371371
372- # we also allow comparison with numbers
373- Base.:(== )(x:: Py , y:: Number ) = pyeq (Bool, x, y)
374- Base.:(<= )(x:: Py , y:: Number ) = pyle (Bool, x, y)
375- Base.:(< )(x:: Py , y:: Number ) = pylt (Bool, x, y)
376- Base. isless (x:: Py , y:: Number ) = pylt (Bool, x, y)
377- Base. isequal (x:: Py , y:: Number ) = pyeq (Bool, x, y)
378-
379- Base.:(== )(x:: Number , y:: Py ) = pyeq (Bool, x, y)
380- Base.:(<= )(x:: Number , y:: Py ) = pyle (Bool, x, y)
381- Base.:(< )(x:: Number , y:: Py ) = pylt (Bool, x, y)
382- Base. isless (x:: Number , y:: Py ) = pylt (Bool, x, y)
383- Base. isequal (x:: Number , y:: Py ) = pyeq (Bool, x, y)
384-
385372Base. zero (:: Type{Py} ) = pyint (0 )
386373Base. one (:: Type{Py} ) = pyint (1 )
387374
@@ -407,44 +394,7 @@ Base.xor(x::Py, y::Py) = pyxor(x, y)
407394Base.:(| )(x:: Py , y:: Py ) = pyor (x, y)
408395Base.:(^ )(x:: Py , y:: Py ) = pypow (x, y)
409396
410- # also allow binary arithmetic with numbers
411- Base.:(+ )(x:: Number , y:: Py ) = pyadd (x, y)
412- Base.:(- )(x:: Number , y:: Py ) = pysub (x, y)
413- Base.:(* )(x:: Number , y:: Py ) = pymul (x, y)
414- # Base.:(+)(x::Number, y::Py) = pymatmul(x, y)
415- Base. div (x:: Number , y:: Py ) = pyfloordiv (x, y)
416- Base.:(/ )(x:: Number , y:: Py ) = pytruediv (x, y)
417- Base. rem (x:: Number , y:: Py ) = pymod (x, y)
418- # Base.:(+)(x::Number, y::Py) = pydivmod(x, y)
419- Base.:(<< )(x:: Number , y:: Py ) = pylshift (x, y)
420- Base.:(>> )(x:: Number , y:: Py ) = pyrshift (x, y)
421- Base.:(& )(x:: Number , y:: Py ) = pyand (x, y)
422- Base. xor (x:: Number , y:: Py ) = pyxor (x, y)
423- Base.:(| )(x:: Number , y:: Py ) = pyor (x, y)
424- Base.:(^ )(x:: Number , y:: Py ) = pypow (x, y)
425-
426- Base.:(+ )(x:: Py , y:: Number ) = pyadd (x, y)
427- Base.:(- )(x:: Py , y:: Number ) = pysub (x, y)
428- Base.:(* )(x:: Py , y:: Number ) = pymul (x, y)
429- # Base.:(+)(x::Py, y::Number) = pymatmul(x, y)
430- Base. div (x:: Py , y:: Number ) = pyfloordiv (x, y)
431- Base.:(/ )(x:: Py , y:: Number ) = pytruediv (x, y)
432- Base. rem (x:: Py , y:: Number ) = pymod (x, y)
433- # Base.:(+)(x::Py, y::Number) = pydivmod(x, y)
434- Base.:(<< )(x:: Py , y:: Number ) = pylshift (x, y)
435- Base.:(>> )(x:: Py , y:: Number ) = pyrshift (x, y)
436- Base.:(& )(x:: Py , y:: Number ) = pyand (x, y)
437- Base. xor (x:: Py , y:: Number ) = pyxor (x, y)
438- Base.:(| )(x:: Py , y:: Number ) = pyor (x, y)
439- Base.:(^ )(x:: Py , y:: Number ) = pypow (x, y)
440-
441397Base. powermod (x:: Py , y:: Py , z:: Py ) = pypow (x, y, z)
442- Base. powermod (x:: Number , y:: Py , z:: Py ) = pypow (x, y, z)
443- Base. powermod (x:: Py , y:: Number , z:: Py ) = pypow (x, y, z)
444- Base. powermod (x:: Py , y:: Py , z:: Number ) = pypow (x, y, z)
445- Base. powermod (x:: Number , y:: Number , z:: Py ) = pypow (x, y, z)
446- Base. powermod (x:: Number , y:: Py , z:: Number ) = pypow (x, y, z)
447- Base. powermod (x:: Py , y:: Number , z:: Number ) = pypow (x, y, z)
448398
449399# documentation
450400function Base. Docs. getdoc (x:: Py , @nospecialize (sig) = Union{})
0 commit comments