MCPcopy Create free account
hub / github.com/ipython/ipython / warn

Method warn

IPython/core/display.py:704–714  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

702
703 def __init__(self, data=None, url=None, filename=None, metadata=None):
704 def warn():
705 if not data:
706 return False
707
708 #
709 # Avoid calling lower() on the entire data, because it could be a
710 # long string and we're only interested in its beginning and end.
711 #
712 prefix = data[:10].lower()
713 suffix = data[-10:].lower()
714 return prefix.startswith("<iframe ") and suffix.endswith("</iframe>")
715
716 if warn():
717 warnings.warn("Consider using IPython.display.IFrame instead")

Callers 15

__init__Method · 0.80
getdefaultencodingFunction · 0.80
freeze_term_titleFunction · 0.80
formatMethod · 0.80
signatures.pyFile · 0.80
newline_with_copy_marginFunction · 0.80
parse_command_lineMethod · 0.80
_pylab_changedMethod · 0.80
mainloopMethod · 0.80
inputhookFunction · 0.80
install_payload_pageFunction · 0.80
BdbQuit_excepthookFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected