Path 1: 6 calls (1.0)

' ' (6)

'\n' (6)

None (6)

False (6)

('foo', 'bar') (1) ('foo\n',) (1) ('foo\n\n',) (1) ('foo',) (1) ('fooX',) (1) ('fooXX',) (1)

None (6)

1def print(
2    *objects: Any,
3    sep: str = " ",
4    end: str = "\n",
5    file: Optional[IO[str]] = None,
6    flush: bool = False,
7) -> None:
8    r"""Print object(s) supplied via positional arguments.
9    This function has an identical signature to the built-in print.
10    For more advanced features, see the :class:`~rich.console.Console` class.
11
12    Args:
13        sep (str, optional): Separator between printed objects. Defaults to " ".
14        end (str, optional): Character to write at end of output. Defaults to "\\n".
15        file (IO[str], optional): File to write to, or None for stdout. Defaults to None.
16        flush (bool, optional): Has no effect as Rich always flushes output. Defaults to False.
17
18    """
19    from .console import Console
20
21    write_console = get_console() if file is None else Console(file=file)
22    return write_console.print(*objects, sep=sep, end=end)