.= multimethod

Methods

.=(obj:NormalType, field:Str, v:Any)
Set NormalType (a type that is typically defined by user) field. Throws FieldNotFound.

Automatically called by NGS for syntax

obj.field = v

Parameters

fieldField to set. Currently only "user" is supported.

Returns

v
.=(obj:NormalTypeInstance, field:Str, v:Any)
Set Normal type (a type that is typically defined by user) instance field

Automatically called by NGS for syntax

obj.field = v

Returns

v

Example

type T; t=T(); t.x=1
.=(hl:HashLike, k:Any, v:Any) Source: stdlib.ngs:791
Set value.

Automatically called by NGS for syntax

your_hashlike.literal_key = v

Returns

v
.=(h:Hash, field:Str, v:Any) Source: stdlib.ngs:1546
Set hash key.

Returns

v

Example

h = {"a": 1}
h.a = 2  # 2, Same as h["a"] = 2
.=(a:Arr, field:Str, v:Any) Source: stdlib.ngs:1588
Set field of every element in array to v

Returns

v

Example

a=[{"x": 1}, {"x": 2}]
a.y = 10
# a == [{"x": 1, "y": 10}, {"x": 2, "y": 10}]
.=(p:Process, field:Str, v:Any) Source: stdlib.ngs:4671
Set process "stdout"

Parameters

field"stdout"

Returns

Unspecified, do not count on this value
.=(p:Process, field:Str, v:Any) Source: stdlib.ngs:4687
Set process "stderr"

Parameters

field"stderr"

Returns

Unspecified, do not count on this value