##// END OF EJS Templates
Minor syntax cleanup and silification....
Matthias Bussonnier -
Show More
@@ -85,7 +85,17 b' def _new_id():'
85 85 return b2a_hex(os.urandom(16)).decode('ascii')
86 86
87 87
88 def display(*objs, include=None, exclude=None, metadata=None, transient=None, display_id=None, **kwargs):
88 def display(
89 *objs,
90 include=None,
91 exclude=None,
92 metadata=None,
93 transient=None,
94 display_id=None,
95 raw=False,
96 clear=False,
97 **kwargs
98 ):
89 99 """Display a Python object in all frontends.
90 100
91 101 By default all representations will be computed and sent to the frontends.
@@ -242,8 +252,6 b' def display(*objs, include=None, exclude=None, metadata=None, transient=None, di'
242 252 print(*objs)
243 253 return
244 254
245 raw = kwargs.pop("raw", False)
246 clear = kwargs.pop("clear", False)
247 255 if transient is None:
248 256 transient = {}
249 257 if metadata is None:
@@ -636,7 +636,7 b' class Magics(Configurable):'
636 636 '%s ( allowed: "%s" %s)' % (e.msg, opt_str, " ".join(long_opts))
637 637 ) from e
638 638 for o, a in opts:
639 if mode is "string" and preserve_non_opts:
639 if mode == "string" and preserve_non_opts:
640 640 # remove option-parts from the original args-string and preserve remaining-part.
641 641 # This relies on the arg_split(...) and getopt(...)'s impl spec, that the parsed options are
642 642 # returned in the original order.
@@ -334,7 +334,7 b' class InteractiveShellEmbed(TerminalInteractiveShell):'
334 334 self.compile.flags = orig_compile_flags
335 335
336 336
337 def embed(**kwargs):
337 def embed(*, header="", compile_flags=None, **kwargs):
338 338 """Call this to embed IPython at the current point in your program.
339 339
340 340 The first invocation of this will create an :class:`InteractiveShellEmbed`
@@ -360,8 +360,6 b' def embed(**kwargs):'
360 360 config argument.
361 361 """
362 362 config = kwargs.get('config')
363 header = kwargs.pop('header', u'')
364 compile_flags = kwargs.pop('compile_flags', None)
365 363 if config is None:
366 364 config = load_default_config()
367 365 config.InteractiveShellEmbed = config.TerminalInteractiveShell
General Comments 0
You need to be logged in to leave comments. Login now