I do agree think a object-oriented interface would be more natural than passing an elg handle all over the place.
-
-
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 -
Replying to @o_guest @michaelhoffman and
I'm still trying to understand what a class is--currently it seems like a sort of hybrid of a variable and a module
2 replies 0 retweets 0 likes -
There are no variables in Python. There are objects and you can give a name to the object.
1 reply 0 retweets 2 likes -
Replying to @michaelhoffman @cMadan and
x = 1 y = x In some languages, x and y would store two different copies of the number 1. In Python they both point to the same object.
1 reply 0 retweets 2 likes -
Replying to @michaelhoffman @cMadan and
Easier to see if you set x to something mutable like a list. Whatever changes made to the list, youll see them accessed through both x and y
1 reply 0 retweets 2 likes
If you know pointers in C it's a good time to mention you do, as the concept helps.
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.