I know this was just hacked out in an afternoon, so feel free to ignore this.
There's no reason to wrap the properties of the Earthquake class with getter functions, they can be accessed directly anyway. If you absolutely need to provide get/set logic (which you don't here, you're just returning the accesses), you should use properties
Another style thing here, you actually don't need a class here. You could just use a dict or a namedtuple, which'd cut down on a lot of code :)
Hey Ian, thanks for the suggestions. Must make sure to actually read some python best practices before I javafy my brain. Will make some changes when I get a chance.
Hey,
I know this was just hacked out in an afternoon, so feel free to ignore this.
There's no reason to wrap the properties of the Earthquake class with getter functions, they can be accessed directly anyway. If you absolutely need to provide get/set logic (which you don't here, you're just returning the accesses), you should use properties
Another style thing here, you actually don't need a class here. You could just use a
dict
or anamedtuple
, which'd cut down on a lot of code :)love ian <3