-
-
No worries, it's still very much a WIP. I don't know what a Python class is, but I guess I should look into that
-
It's just like any OO. https://docs.python.org/3/tutorial/classes.html …
-
So, I can program... but I never learned OO properly and have always found it confusing
End of conversation
New conversation -
-
-
It is common and fine to use module-level constants. Advice against globals is about not writing to globals.
-
Right, I definitely am not going to define anything as a global, just want some module level constants instead of hardcoding those values
-
I do agree think a object-oriented interface would be more natural than passing an elg handle all over the place.
-
You're probably right, but I need to learn how to do OO programming first :/
-
The OO required here is not fancy. Give it a look. https://docs.python.org/3/tutorial/classes.html#a-first-look-at-classes … http://www.greenteapress.com/thinkpython/html/thinkpython018.html …
-
The main difference is that I could do elg.function() instead of treating it as a variable to pass into a function, right?
-
I'm not sure what you mean here because I am not familiar with your code. But the main diff will be that instead of globals they will be
-
properties, i.e., part of an object you pass around.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.