Wait till you see the AST hack for unit conversion. :)

-Robert
Sent from my iPhone.

On Wed, May 1, 2013 at 12:11 PM, kyleabeauchamp <notifications@github.com>
wrote:

>> +
>> +def ensure_mode(*m):
>> +    """This is a little decorator that is used inside HDF5Trajectory
>> +    to validate that the file is open in the correct mode before doing
>> +    a a method
>> +
>> +    Parameters
>> +    ----------
>> +    m : str or list
>> +        One or more of ['w', 'r', 'a'], giving the allowable modes
>> +        for the method
>> +
>> +    Example
>> +    -------
>> +    class HDF5Trajectory:
>> +        @ensure_mode('w')
> Cute
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/rmcgibbo/mdtraj/pull/37/files#r4042551