GeospatialPython/pyshp — pull request #16 by riggsd (2014-12-03 23:04:39+00:00)
Title: Gracefully handle NULL numeric, date fields

Though the DBase spec doesn't allow NULL values, QGIS allows one to write/edit a Shapefile with specially-encoded NULL values. It does this by writing full-width '*' characters for numeric types, and '0' characters for date types.

Pyshp blows up with a ValueError when parsing these NULL values. This patch gracefully handles these specially-encoded NULLs, and hands back None as a value, which is much more Pythonic than casting incorrectly to 0 or [0, 0, 0] respectively.

Also attached is a simple example Shapefile created by QGIS with NULL values.

![screenshot 2014-12-03 17 59 32](https://cloud.githubusercontent.com/assets/647785/5290649/c6c80792-7b16-11e4-828b-5910f14ae46a.png)