# Path: tt/errors/arguments.py
# class InvalidArgumentTypeError(ArgumentError):
#     """An exception type for invalid argument types.
# 
#     To illustrate this error type, let's try passing an invalid argument when
#     creating a :class:`TruthTable <tt.tables.truth_table.TruthTable>`::
# 
#         >>> from tt import TruthTable
#         >>> t = TruthTable(7)
#         Traceback (most recent call last):
#             ...
#         tt.errors.arguments.InvalidArgumentTypeError: Arg `expr` must be of \
# type `str` or `BooleanExpression`
# 
#     """
# 
# class InvalidArgumentValueError(ArgumentError):
#     """An exception type for invalid argument values.
# 
#     Here's an example where we pass a non-power of 2 number of values when
#     attempting to create a :class:`TruthTable \
#     <tt.tables.truth_table.TruthTable>`::
# 
#         >>> from tt import TruthTable
#         >>> t = TruthTable(from_values='01x')
#         Traceback (most recent call last):
#             ...
#         tt.errors.arguments.InvalidArgumentValueError: Must specify a number \
# of input values that is a power of 2
# 
#     """


import re
from collections import namedtuple
from keyword import kwlist
from tt.errors import (
    InvalidArgumentTypeError,
    InvalidArgumentValueError)
    :raises InvalidArgumentTypeError: If ``identifier_name`` is not a string.
    :raises InvalidArgumentValueError: If ``identifier_name`` is an empty
        string.

    As an example::

        >>> from tt import is_valid_identifier
        >>> is_valid_identifier('$var')
        False
        >>> is_valid_identifier('va#r')
        False
        >>> is_valid_identifier('for')
        False
        >>> is_valid_identifier('False')
        False
        >>> is_valid_identifier('var')
        True
        >>> is_valid_identifier('')
        Traceback (most recent call last):
            ...
        tt.errors.arguments.InvalidArgumentValueError: identifier_name cannot \
be empty
        >>> is_valid_identifier(None)
        Traceback (most recent call last):
            ...
        tt.errors.arguments.InvalidArgumentTypeError: identifier_name must be \
a string

    """
    if not isinstance(identifier_name, str):

# Path: tt/errors/arguments.py
# class InvalidArgumentTypeError(ArgumentError):
#     """An exception type for invalid argument types.
# 
#     To illustrate this error type, let's try passing an invalid argument when
#     creating a :class:`TruthTable <tt.tables.truth_table.TruthTable>`::
# 
#         >>> from tt import TruthTable
#         >>> t = TruthTable(7)
#         Traceback (most recent call last):
#             ...
#         tt.errors.arguments.InvalidArgumentTypeError: Arg `expr` must be of \
# type `str` or `BooleanExpression`
# 
#     """
# 
# class InvalidArgumentValueError(ArgumentError):
#     """An exception type for invalid argument values.
# 
#     Here's an example where we pass a non-power of 2 number of values when
#     attempting to create a :class:`TruthTable \
#     <tt.tables.truth_table.TruthTable>`::
# 
#         >>> from tt import TruthTable
#         >>> t = TruthTable(from_values='01x')
#         Traceback (most recent call last):
#             ...
#         tt.errors.arguments.InvalidArgumentValueError: Must specify a number \
# of input values that is a power of 2
# 
#     """


# Path: tt/definitions/operands.py
import re
from collections import namedtuple
from keyword import kwlist
from tt.errors import (
    InvalidArgumentTypeError,
    InvalidArgumentValueError)

    :raises InvalidArgumentTypeError: If ``identifier_name`` is not a string.
    :raises InvalidArgumentValueError: If ``identifier_name`` is an empty
        string.

    As an example::

        >>> from tt import is_valid_identifier
        >>> is_valid_identifier('$var')
        False
        >>> is_valid_identifier('va#r')
        False
        >>> is_valid_identifier('for')
        False
        >>> is_valid_identifier('False')
        False
        >>> is_valid_identifier('var')
        True
        >>> is_valid_identifier('')
        Traceback (most recent call last):
            ...
        tt.errors.arguments.InvalidArgumentValueError: identifier_name cannot \
be empty
        >>> is_valid_identifier(None)
        Traceback (most recent call last):
            ...
        tt.errors.arguments.InvalidArgumentTypeError: identifier_name must be \
a string

    """
    if not isinstance(identifier_name, str):

        raise InvalidArgumentTypeError('identifier_name must be a string')