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
{{ message }}
This repository has been archived by the owner on Oct 31, 2020. It is now read-only.
I think the way to do this is class variables? Does this give a syntax error? It means that dimensionality is a part of the class though, and not a parameter. That's perhaps not ideal.
That doesn't give a syntax error, but it also doesn't let you pass in the dimensionality as a parameter, which is what I've wanted to do a few times. Basically it makes it much harder to write general-purpose SimpleNodes.
It's not a big problem, but it'd be nice if there were a way to do this.
You could make dimensionality a property that sets up the origins if it's changed? I'm not sure if it's possible in 2.5...
@propertydefdimensionality(self):
# Make sure origin dimensionality matches# self._dimensionality, and if not change itreturnself._dimensionality@dimensionality.setterdefdimensionality(self, dims):
self._dimensionality=dims
Or you can make get/set methods and have in the class
I'd like a way of having the dimensionality of a SimpleNode origin/termination be based on construction parameters.
Right now, I can't do this:
The same problem would appear in the decorator approach mentioned in issue #385, which would look something like this:
Right now, you can sorta do this by this horrendous approach
Any suggestions? I'm having trouble coming up with a legit syntax for doing this...
The text was updated successfully, but these errors were encountered: