You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be much easier to use, especially for people who aren't well-versed in the literature.
Think hard about whether you want to continue to use X, etc. variable names. I don't think we lose anything by being a bit more descriptive.
I go back and forth on this, but my conclusion right now is that this object should be a subclass of dict:
fromcollectionsimportUserDictclassGSA_Dict(UserDict):
def__str__(self):
return"GSA_Dict instance with the following keys:\n{}".format("|".join(keyforkeyinself))
This subclass a) makes it clear that this is a "special" object, b) allows for nicer string representation in the shell, and c) allows you to add custom methods, if desirable, in the future.
This could be much easier to use, especially for people who aren't well-versed in the literature.
Think hard about whether you want to continue to use
X
, etc. variable names. I don't think we lose anything by being a bit more descriptive.I go back and forth on this, but my conclusion right now is that this object should be a subclass of dict:
This subclass a) makes it clear that this is a "special" object, b) allows for nicer string representation in the shell, and c) allows you to add custom methods, if desirable, in the future.
Is there a reason that we can't just say:
This is a lot easier to parse, at least for me.
The text was updated successfully, but these errors were encountered: