def print(self, tag=None, name=None):
_name = name<EOL>if _name is None:<EOL><INDENT>_name = '<STR_LIT>'<EOL><DEDENT>fn = streamsx.topology.functions.print_flush<EOL>if tag is not None:<EOL><INDENT>tag = str(tag) + '<STR_LIT>'<EOL>fn = lambda v : streamsx.topology.functions.print_flush(tag + str(v))<EOL><DEDENT>sp = self.for_each(fn, name=_name)<EOL>sp._op().sl = _SourceLocation(_source_info(), '<STR_LIT>')<EOL>return sp<EOL>
Prints each tuple to stdout flushing after each tuple.

If `tag` is not `None` then each tuple has "tag: " prepended
to it before printing.

Args:
    tag: A tag to prepend to each tuple.
    name(str): Name of the resulting stream.
        When `None` defaults to a generated name.
Returns:
    streamsx.topology.topology.Sink: Stream termination.

.. versionadded:: 1.6.1 `tag`, `name` parameters.

.. versionchanged:: 1.7
    Now returns a :py:class:`Sink` instance.