def __init__(self, batch_type=None, timestamp=None, consistency=None, execute_on_exception=False,<EOL>timeout=NOT_SET):
self.queries = []<EOL>self.batch_type = batch_type<EOL>if timestamp is not None and not isinstance(timestamp, (datetime, timedelta)):<EOL><INDENT>raise CQLEngineException('<STR_LIT>')<EOL><DEDENT>self.timestamp = timestamp<EOL>self._consistency = consistency<EOL>self._execute_on_exception = execute_on_exception<EOL>self._timeout = timeout<EOL>self._callbacks = []<EOL>
:param batch_type: (optional) One of batch type values available through BatchType enum
:type batch_type: str or None
:param timestamp: (optional) A datetime or timedelta object with desired timestamp to be applied
    to the batch transaction.
:type timestamp: datetime or timedelta or None
:param consistency: (optional) One of consistency values ("ANY", "ONE", "QUORUM" etc)
:type consistency: The :class:`.ConsistencyLevel` to be used for the batch query, or None.
:param execute_on_exception: (Defaults to False) Indicates that when the BatchQuery instance is used
    as a context manager the queries accumulated within the context must be executed despite
    encountering an error within the context. By default, any exception raised from within
    the context scope will cause the batched queries not to be executed.
:type execute_on_exception: bool
:param timeout: (optional) Timeout for the entire batch (in seconds), if not specified fallback
    to default session timeout
:type timeout: float or None