def _compile_with_flags(self, code: str, mode: str) -> Any:
        "Compile code with the right compiler flags."
        return compile(
            code,
            "<stdin>",
            mode,
            flags=self.get_compiler_flags(),
            dont_inherit=True,
        )
Compile code with the right compiler flags.
src/ptpython/repl.py