File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -351,6 +351,32 @@ def __contains__(self, key):
351
351
"""
352
352
return key in self ._options
353
353
354
+ def __call__ (self , ** kwargs ):
355
+ """A short-cut to update(), but it returns helpee object.
356
+ This is mainly to support one-line/inline visualizations.
357
+
358
+ Parameters
359
+ ----------
360
+ kwargs: **kwargs
361
+
362
+ Returns
363
+ -------
364
+ helpee: Any
365
+
366
+ Example
367
+ -------
368
+ .. code-block:: python
369
+
370
+ gus.show(
371
+ mesh1.show_options(c="red"),
372
+ mesh2.show_options(c="green"),
373
+ mesh3.show_options(c="blue"),
374
+ )
375
+ """
376
+ self .update (** kwargs )
377
+
378
+ return self ._helpee
379
+
354
380
def get (self , key , default = None ):
355
381
"""
356
382
Gets value from key and default. Similar to dict.get(),
You can’t perform that action at this time.
0 commit comments