I have been migrating from MATLAB over the last months, and spyder has
really been beneficial in that process. It is really the best IDE for
python!

I have noticed some strange behaviour of the variable editor. I have
used the following class which emulates the struct data type in
matlab. It's basically a dictionary which is easier to access than the
normal one in python. When I create a struct and open it in the
variable inspector it works fine, and if I close it by the x then
everything is ok, but if i use ok, then it's suddenly converted to a
dict. Is this a bug or a feature - I find it a bit strange that the
variable inspector is able to change the data's type and not only it's
content.

class struct(dict):
    '''Matlab style struct. Wow I have been missing this'''
    def __getattr__(self, attr):
        return self.get(attr, None)
    __setattr__= dict.__setitem__
    __delattr__= dict.__delitem__

In general it would be a nice extension if the variable editor could
support more general data types as objects.

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/spyderlib?hl=en.

Reply via email to