class_docstr: >>> from cStringIO import StringIO
  >>> f = StringIO()
  >>> w = DictWriter(f, fieldnames=['name', 'place'])
  >>> w.writerow({'name': 'Cary Grant', 'place': 'hollywood'})
  >>> w.writerow({'name': 'Nathan Brillstone', 'place': u'øLand'})
  >>> w.writerow({'name': u'Willam ø. Unicoder', 'place': u'éSpandland'})
  >>> f.seek(0)
  >>> r = DictReader(f, fieldnames=['name', 'place'])
  >>> print r.next() == {'name': 'Cary Grant', 'place': 'hollywood'}
  True
  >>> print r.next() == {'name': 'Nathan Brillstone', 'place': u'øLand'}
  True
  >>> print r.next() == {'name': u'Willam ø. Unicoder', 'place': u'éSpandland'}
  True
class_docstr_tok: [">",">",">","from","cStringIO","import","StringIO",">",">",">","f","=","StringIO","(",")",">",">",">","w","=","DictWriter","(","f",",","fieldnames=","[","'name","'",",","'place","'","]",")",">",">",">","w.writerow","(","{","'name","'",":","'Cary","Grant","'",",","'place","'",":","'hollywood","'","}",")",">",">",">","w.writerow","(","{","'name","'",":","'Nathan","Brillstone","'",",","'place","'",":","u'\u00f8Land","'","}",")",">",">",">","w.writerow","(","{","'name","'",":","u'Willam","\u00f8.","Unicoder","'",",","'place","'",":","u'\u00e9Spandland","'","}",")",">",">",">","f.seek","(","0",")",">",">",">","r","=","DictReader","(","f",",","fieldnames=","[","'name","'",",","'place","'","]",")",">",">",">","print","r.next","(",")","==","{","'name","'",":","'Cary","Grant","'",",","'place","'",":","'hollywood","'","}","True",">",">",">","print","r.next","(",")","==","{","'name","'",":","'Nathan","Brillstone","'",",","'place","'",":","u'\u00f8Land","'","}","True",">",">",">","print","r.next","(",")","==","{","'name","'",":","u'Willam","\u00f8.","Unicoder","'",",","'place","'",":","u'\u00e9Spandland","'","}","True"]
code: def __init__(
      self,
      csvfile,
      fieldnames=None,
      restkey=None,
      restval=None,
      dialect="excel",
      encoding="utf-8",
      errors="strict",
      *args,
      **kwds,
  ):
      if fieldnames is not None:
          fieldnames = _stringify_list(fieldnames, encoding)
      csv.DictReader.__init__(
          self,
          csvfile,
          fieldnames,
          restkey,
          restval,
          dialect,
          *args,
          **kwds,
      )
      self.reader = UnicodeReader(
          csvfile,
          dialect,
          encoding=encoding,
          errors=errors,
          *args,
          **kwds,
      )
      if fieldnames is None and not hasattr(
          csv.DictReader, "fieldnames"
      ):
          # Python 2.5 fieldnames workaround. (http://bugs.python.org/issue3436)
          reader = UnicodeReader(
              csvfile, dialect, encoding=encoding, *args, **kwds
          )
          self.fieldnames = _stringify_list(
              reader.next(), reader.encoding
          )
      self.unicode_fieldnames = [
          _unicodify(f, encoding) for f in self.fieldnames
      ]
      self.unicode_restkey = _unicodify(restkey, encoding)
  
imports: import csv
  from textblob.compat import izip
label_desc: Use image node_id 1 to create a new DictReader object from inherited base classes: csv with example: obj = DictReader(csvfile, fieldnames, restkey, restval, dialect, encoding, errors)