Change file type handling
Change order of SoundFile constructor arguments

Moving 'mode' right after 'name' and 'format' after 'subtype' and 'endian'.
This way most situations can be handled with positional arguments only, e.g.:

f1 = SoundFile('file1.wav')
f2 = SoundFile('file2.wav', 'rw')
f3 = SoundFile('file3.wav', 'w', 48000, 1, sf.PCM_24)
Add open() function
Add mode property

... and disallow numeric mode parameters (only 'r', 'w' and 'rw' are allowed)
Prefix masks in module namespace with _
Fix __setattr__()

In new-style classes the base class __setattr__() has to be called
instead of inserting the value into self.__dict__.

See http://docs.python.org/2/reference/datamodel.html#customizing-attribute-access
Improve file type handling for raw files

... and set default channels=None