You are viewing an older version (9.10.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.10.0 / IPython / utils / ipstruct / Struct / __init__

function

IPython.utils.ipstruct:Struct.__init__

source: /IPython/utils/ipstruct.py :41

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())
['a', 'b', 'c']

Aliases

  • IPython.core.interactiveshell.Struct.__init__