Aaron Plocharczyk's class hack post

by Aaron Plocharczyk

14 Jun 2017

Here’s the hack:



Reflection:
This reading was great for explaining classes. Starting off, I did not know at all how to set up classes in python or how you were allowed to refer to things. But after doing that reading, I figured out how to set up an init function, create a method, call a method from within the class AND externally, import the class into another file, and instantiate an object. I believe that adding a class to my Poetry Slam trinket made it very readable and certainly helped me work through how to create a class before I do so in my final project. A cool tip that I figured out that I did not see in the reading was that if you want to call a method from within the class itself, you can say:

self.whatever_method_you_want()

Honestly, I did think that integrating classes into an existing python program would be complicated, but I was able to work through it and learn a lot about how to set up classes in the process.

I am a senior at UNC Chapel Hill taking my last couple courses this summer. Find Aaron Plocharczyk on Twitter, Github, and on the web.