{ } Raw JSON

bundles / nbformat 5.11.1 / nbformat / _struct / Struct / __init__

function

nbformat._struct:Struct.__init__

source: /nbformat/_struct.py:28

Signature

def __init__(self, *args, **kw)

Summary

Initialize with a dictionary, another Struct, or data.

Parameters

*args : dict, Struct

Initialize with one dict or Struct

**kw : dict

Initialize with key, value pairs.

Examples

s = Struct(a=10,b=30)
s.a
s.b
s2 = Struct(s,c=30)
sorted(s2.keys())

Aliases

  • nbformat._struct.Struct.__init__