OP2/PyOP2 — pull request #7 by kynan (2012-07-17 20:14:36+00:00)
Title: Validations and API fixes

Formalise argument validation in the _PyOP2_ API:
* introduce a `validate` decorator to validate that a certain argument (by name) has a certain type and raise a certain exception of not
* introduce specific exceptions for invalid argument conditions with names derived from the Python standard library exceptions they're derived from e.g. `DataValueError(ValueError)`
* use the `validate` decorator to validate arguments of all functions in the _PyOP2_ public API
* make `validate_reshape` more robust and emit more helpful errors

API fixes:
* add missing properties to all public _PyOP2_ objects
* rename IterationSpace dims property/attribute to extents for clarity
* do not allow passing None for data in Const/Global/Map
* `op2.exit()` unsets the backend

Passes all existing unit tests and those introduced in the _unit-tests_ branch.