Assuming from the non-PEP8 in some places, you might wanna use a linter? Also which is the function you wanna alias?
-
-
Replying to @o_guest @spinicist and
Yeah, I probably should use a linter soon, right now been going more for basic functionality and then improving docs and generalizability
2 replies 0 retweets 1 like -
KEY_BLANK was going to be an alias of icon_solid, but instead decided to make it a constant to make things more efficient
1 reply 0 retweets 0 likes -
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 -
Replying to @o_guest @spinicist and
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
1 reply 0 retweets 0 likes -
Replying to @cMadan @spinicist and
It's just like any OO. https://docs.python.org/3/tutorial/classes.html …
2 replies 0 retweets 0 likes -
It's really important to understand why globals aren't good in most cases and why/how classes help address issues with them.
1 reply 0 retweets 0 likes -
Passing around an object, for example, as opposed to using globals, which often introduce bugs and can be against many SE principles.
2 replies 0 retweets 0 likes -
I'd really recommend getting to grips with these. It will really help your code.
1 reply 0 retweets 0 likes -
Learning OO? I'm probably not the best person to ask (I'm the type that write classes on C) but why not a Python tutorial?
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.