-
Pet Projects
Tag Archives: object oriented
This is the basic structure of a Python class. >>> class Simplex: … "An example class""" … def __init__(self, x, y): … self.a = x … self.b = y … def addition(self): … return self.a + self.b … >>> z … Continue reading
I had a scenario at work today that need me to use a variable in an object and call it like I would when using keys in an array. Like when I have an array, I would do something like … Continue reading