Called to implement evaluation of f[index].
f.__getitem__(index) <==> f[index]
The field is treated as if it were a single element field list containing itself, i.e. f[index] is equivalent to cf.FieldList(f)[index].
Examples 1: |
---|
>>> g = f[0]
>>> g = f[:1]
>>> g = f[1:]
Returns: |
|
---|
See also
Examples 2: |
---|
>>> f[0] is f[-1] is f
True
>>> f[0:1].equals(cf.FieldList(f))
True
>>> f[0:1][0] is f
True
>>> f[1:].equals(cf.FieldList())
True
>>> f[1:]
[]
>>> f[-1::3][0] is f
True