code: def field(self, name, fieldType="C", size="50", decimal=0):
          
          if fieldType == "D":
              size = "8"
              decimal = 0
          elif fieldType == "L":
              size = "1"
              decimal = 0
          if len(self.fields) >= 2046:
              raise ShapefileException(
                  "Shapefile Writer reached maximum number of fields: 2046.")
          self.fields.append((name, fieldType, size, decimal))
docs: Adds a dbf field descriptor to the shapefile.