class_docstr: List derivative with a special access attributes.
  
  These are normal lists, but with the special attributes:
  
  * .l (or .list) : value as list (the list itself).
  * .n (or .nlstr): value as a string, joined on newlines.
  * .s (or .spstr): value as a string, joined on spaces.
  * .p (or .paths): list of path objects (requires path.py package)
  
  Any values which require transformations are computed only once and
  cached.
class_docstr_tok: ["List","derivative","with","a","special","access","attributes",".","These","are","normal","lists",",","but","with","the","special","attributes",":","*",".l","(","or",".list",")",":","value","as","list","(","the","list","itself",")",".","*",".n","(","or",".nlstr",")",":","value","as","a","string",",","joined","on","newlines",".","*",".s","(","or",".spstr",")",":","value","as","a","string",",","joined","on","spaces",".","*",".p","(","or",".paths",")",":","list","of","path","objects","(","requires","path.py","package",")","Any","values","which","require","transformations","are","computed","only","once","and","cached","."]
docstr: Collect whitespace-separated fields from string list
  
  Allows quick awk-like usage of string lists.
  
  Example data (in var a, created by 'a = !ls -l')::
  
      -rwxrwxrwx  1 ville None      18 Dec 14  2006 ChangeLog
      drwxrwxrwx+ 6 ville None       0 Oct 24 18:05 IPython
  
  * ``a.fields(0)`` is ``['-rwxrwxrwx', 'drwxrwxrwx+']``
  * ``a.fields(1,0)`` is ``['1 -rwxrwxrwx', '6 drwxrwxrwx+']``
    (note the joining by space).
  * ``a.fields(-1)`` is ``['ChangeLog', 'IPython']``
  
  IndexErrors are ignored.
  
  Without args, fields() just split()'s the strings.
docstr_tok: ["Collect","whitespace-separated","fields","from","string","list","Allows","quick","awk-like","usage","of","string","lists",".","Example","data","(","in","var","a",",","created","by","'","a","=","!","ls","-l","'",")",":",":","-rwxrwxrwx","1","ville","None","18","Dec","14","2006","ChangeLog","drwxrwxrwx+","6","ville","None","0","Oct","24","18:05","IPython","*","``","a.fields","(","0",")","``","is","``","[","'-rwxrwxrwx","'",",","'drwxrwxrwx+","'","]","``","*","``","a.fields","(","1,0",")","``","is","``","[","'","1","-rwxrwxrwx","'",",","'","6","drwxrwxrwx+","'","]","``","(","note","the","joining","by","space",")",".","*","``","a.fields","(","-1",")","``","is","``","[","'ChangeLog","'",",","'IPython","'","]","``","IndexErrors","are","ignored",".","Without","args",",","fields","(",")","just","split","(",")","'s","the","strings","."]
code: def fields(self, *fields):
      """Collect whitespace-separated fields from string list
  
      Allows quick awk-like usage of string lists.
  
      Example data (in var a, created by 'a = !ls -l')::
  
          -rwxrwxrwx  1 ville None      18 Dec 14  2006 ChangeLog
          drwxrwxrwx+ 6 ville None       0 Oct 24 18:05 IPython
  
      * ``a.fields(0)`` is ``['-rwxrwxrwx', 'drwxrwxrwx+']``
      * ``a.fields(1,0)`` is ``['1 -rwxrwxrwx', '6 drwxrwxrwx+']``
        (note the joining by space).
      * ``a.fields(-1)`` is ``['ChangeLog', 'IPython']``
  
      IndexErrors are ignored.
  
      Without args, fields() just split()'s the strings.
      """
      if len(fields) == 0:
          return [el.split() for el in self]
  
      res = SList()
      for el in [f.split() for f in self]:
          lineparts = []
  
          for fd in fields:
              try:
                  lineparts.append(el[fd])
              except IndexError:
                  pass
          if lineparts:
              res.append(" ".join(lineparts))
  
      return res
  
imports: from __future__ import absolute_import
  import os
  import re
  import sys
  import textwrap
  from string import Formatter
  from IPython.testing.skipdoctest import skip_doctest_py3, skip_doctest
  from IPython.utils import py3compat
label_desc: Use image node_id 6 for calling the SList obj's underlying member method code with example usage: obj.fields() and returns: res, unknown