29

class devRant_member:
def __init__(self, name):
self.name = name
def say_hi(self):
print( "Hello world, I'm ", self.name)

p = devRant_member("Blacksteel")
p.say_hi()

Comments
  • 3
    Best 'hello world' I've seen yet
  • 2
    Welcome to denvant
  • 4
    @Treighton @RazorSh4rk
    Hey there folks, thanks

    @Treighton
    Haha, well I thought I'd write the damn class, instead of a simple print. Not that it matters, but OCD kicked in, so..
  • 2
    @Blacksteel you will fit in well 😎
  • 0
    Better use camel case for class names
  • 1
    @Madeindjs
    In order to abide by the golden ruleset of "PEP8 the almighty", or some other secret reason that makes it better?

    Eitherway, I don't really care much for camelcase, it looks a bit ugly in my eyes so I stick to underscores (unless it's a team project where we have a specific style guide).
Add Comment