KEY_BLANK was going to be an alias of icon_solid, but instead decided to make it a constant to make things more efficient
-
-
Replying to @cMadan @spinicist and
I can't speak to the efficiency to be honest without getting to grips with your code more. But why are you using globals instead of a class?
2 replies 0 retweets 2 likes -
It is common and fine to use module-level constants. Advice against globals is about not writing to globals.
2 replies 0 retweets 1 like -
Replying to @michaelhoffman @o_guest and
Right, I definitely am not going to define anything as a global, just want some module level constants instead of hardcoding those values
1 reply 0 retweets 0 likes -
I do agree think a object-oriented interface would be more natural than passing an elg handle all over the place.
2 replies 0 retweets 3 likes -
Replying to @michaelhoffman @o_guest and
You're probably right, but I need to learn how to do OO programming first :/
1 reply 0 retweets 1 like -
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 …
2 replies 0 retweets 2 likes -
Replying to @michaelhoffman @o_guest and
The main difference is that I could do elg.function() instead of treating it as a variable to pass into a function, right?
2 replies 0 retweets 0 likes -
Replying to @cMadan @michaelhoffman and
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
1 reply 0 retweets 0 likes -
properties, i.e., part of an object you pass around.
2 replies 0 retweets 0 likes
Also above when you say "module level", what you really mean (i.e., Pythonically) is class level.
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.