src/pylib/pysugar

Search:
Group by:
Source   Edit  

Macros

macro del(seqIdx: untyped)
  • del ls[idx] -> delitem(ls, idx);
  • del obj.attr -> compilation-error. Nim is static-typed,

dynamically deleting object's attributes is not allowed.

for more details.

Note: Nim's del(seq, idx) is an O(1) operation, which moves the last element to idx
Source   Edit  

Templates

template `:=`(name, value: untyped): untyped
Mimic Pythons Operator. Creates new variable name and assign value to it. Source   Edit  
template lambda(code: untyped): untyped
Source   Edit  
template pass()
Source   Edit