Some light-hearted oop

…or: circumstantial evidence that I am still alive.
Python
Object-Oriented Programming
Author

Thadryan

Published

May 10, 2018

Hello there! I am writing to let you know that I have cleared the summit of a couple of beastly projects and will be back to working on the site at at the usual semi-regular pace soon. I am also working on some pieces that are a little larger and more detailed than usual, but the delays should (hopefully) be offset with quality. In the meantime, enjoy some easy-going code humor that doesn’t want to hurt no one as evidence I am still around.

### "trait" classes ###
class Picker(object):
    
    def pick(self):
        print("I'm a picker...")
    
class Grinner(object):
    
    def grin(self):
        print("I'm a grinner...")
    
class Lover(object):
    
    def love(self):
        print("I'm a lover...")
    
class Sinner(object):
    
    def sin(self):
        print("I'm a sinner.")
    
class Joker(object):
    
    def joke(self):
        print("I'm a joker...")
    
class Smoker(object):
    
    def smoke(self):
        print("I'm a smoker...")
        
class MidnightToker(object):
    
    def midnight_toke(self):
        print("I'm a midnight toker.")



### composed class ### 
class SteveMillerObj(Picker, Grinner, Lover, 
                     Sinner, Joker, Smoker, MidnightToker):
    
    def thoughts_on_hurting_someone(self):
        print("I don't want to hurt no one.")
        
    def how_loving_is_obtained(self):
        print("I get my loving on the run.")



### usage ##
Steve_Miller = SteveMillerObj()

# use traits
Steve_Miller.pick()
Steve_Miller.grin()
Steve_Miller.love()
Steve_Miller.sin()

# explains ethos part 1
Steve_Miller.thoughts_on_hurting_someone()

# use traits 
Steve_Miller.joke()
Steve_Miller.smoke()
Steve_Miller.midnight_toke()

# explain ethos part 2
Steve_Miller.how_loving_is_obtained()
I'm a picker...
I'm a grinner...
I'm a lover...
I'm a sinner.
I don't want to hurt no one.
I'm a joker...
I'm a smoker...
I'm a midnight toker.
I get my loving on the run.