Skip to content

Commit de20588

Browse files
committed
Comment/test cleanup
1 parent 178932f commit de20588

1 file changed

Lines changed: 2 additions & 27 deletions

File tree

bitmath/__init__.py

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: MIT
33
# The MIT License (MIT)
44
#
5-
# Copyright © 2014-2016 Tim Case <timbielawa@gmail.com>
5+
# Copyright © 2014-2026 Tim Case <bitmath@lnx.cx>
66
# See GitHub Contributors Graph for more information
77
#
88
# Permission is hereby granted, free of charge, to any person
@@ -24,7 +24,7 @@
2424
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
2525
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2626
# SOFTWARE.
27-
# pylint: disable=bad-continuation,missing-docstring,invalid-name,line-too-long
27+
# pylint: disable=line-too-long
2828

2929
"""Reference material:
3030
The bitmath homepage is located at:
@@ -785,17 +785,6 @@ def __ge__(self, other):
785785

786786
# Reference: https://docs.python.org/3/reference/datamodel.html#emulating-numeric-types
787787

788-
"""These methods are called to implement the binary arithmetic
789-
operations (+, -, *, //, %, divmod(), pow(), **, <<, >>, &, ^, |). For
790-
instance, to evaluate the expression x + y, where x is an instance of
791-
a class that has an __add__() method, x.__add__(y) is called. The
792-
__divmod__() method should be the equivalent to using __floordiv__()
793-
and __mod__(); it should not be related to __truediv__() (described
794-
below). Note that __pow__() should be defined to accept an optional
795-
third argument if the ternary version of the built-in pow() function
796-
is to be supported.object.__complex__(self)
797-
"""
798-
799788
def __add__(self, other):
800789
"""Supported operations with result types:
801790
@@ -895,20 +884,6 @@ def __divmod__(self, other):
895884

896885
##################################################################
897886

898-
"""These methods are called to implement the binary arithmetic
899-
operations (+, -, *, /, %, divmod(), pow(), **, <<, >>, &, ^, |) with
900-
reflected (swapped) operands. These functions are only called if the
901-
left operand does not support the corresponding operation and the
902-
operands are of different types. [2] For instance, to evaluate the
903-
expression x - y, where y is an instance of a class that has an
904-
__rsub__() method, y.__rsub__(x) is called if x.__sub__(y) returns
905-
NotImplemented.
906-
907-
These are the add/sub/mul/div methods for syntax where a number type
908-
is given for the LTYPE and a bitmath object is given for the
909-
RTYPE. E.g., 3 * MiB(3), or 10 / GB(42)
910-
"""
911-
912887
def __radd__(self, other):
913888
# Special case: 0 + bm = bm (identity element, enables built-in sum())
914889
if other == 0:

0 commit comments

Comments
 (0)