Module refinery.units.blockwise.add

Expand source code Browse git
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from . import BinaryOperation


class add(BinaryOperation):
    """
    Add the given argument to each block.
    """
    @staticmethod
    def operate(a, b): return a + b
    @staticmethod
    def inplace(a, b): a += b

Classes

class add (argument, bigendian=False, blocksize=1)

Add the given argument to each block.

Expand source code Browse git
class add(BinaryOperation):
    """
    Add the given argument to each block.
    """
    @staticmethod
    def operate(a, b): return a + b
    @staticmethod
    def inplace(a, b): a += b

Ancestors

Static methods

def operate(a, b)
Expand source code Browse git
@staticmethod
def operate(a, b): return a + b
def inplace(a, b)
Expand source code Browse git
@staticmethod
def inplace(a, b): a += b

Inherited members