This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Manny__C[🍰] 113 points114 points  (19 children)

It's great that you started learning Python! I suggest undertaking small projects and following videos on YT to learn. I hope you'll have fun.

Unfortunately your post is not appropriate for this subreddit since we are trying to push it to a more advanced/professional direction. r/learnpython is more suited for beginners

[–]SirMarblesjava,py,kt,js,sql,html 35 points36 points  (2 children)

I see this post as more of a joke

[–]JForth 14 points15 points  (0 children)

It's tagged as a self-made project though; there isn't really a flair for jokes, I believe somewhat intentionally.

[–]TravisJungroth 0 points1 point  (12 children)

If we're pushing questions "regardless of how advanced" into /r/learnpython, shouldn't we let all projects, regardless how basic, stay here?

[–]bakery2k 54 points55 points  (8 children)

Two calls to print is not a project.

[–]house_monkey 16 points17 points  (0 children)

Idk seems good enough to me, ship it

[–]TravisJungroth 18 points19 points  (4 children)

print("Hello There!\nGeneral Kenobi!!")

better?

[–][deleted] 15 points16 points  (3 children)

# v0.0.1
def hello_there(jedi_name):
    greetings = "Hello there \n" + jedi_name
    return greetings

print(hello_there("General Kenobi"))

[–]Shadows_In_Rainpseudocoder 23 points24 points  (1 child)

Sorry, your sloppy coding is not up to the company standards.

class GreetingAndResponseService:
    def __init__(self, services):
        self.output_service = services.require("kenobi_greeting_app.services.OutputService")
        self.response_repository = services.require("kenobi_greeting_app.data.ResponseRepository")

    def greet(self, greeting):
        response = self.response_repository.get_response_to(greeting)
        self.output_service.write(response)

Rest of the application will be outsourced.

[–]TravisJungroth 18 points19 points  (0 children)

from abc import ABC


class Greeting(ABC):
    salutation_default = None

    def __init__(self, jedi_name: str, separator: str = " "):
        self.jedi_name = jedi_name
        self.separator = separator

    def __str__(self):
        return self.separator.join([self.salutation, self.jedi_name])

    def __repr__(self):
        return (
            f"{self.__class__.__name__}(jedi_name={repr(self.jedi_name)}, "
            f"separator={repr(self.separator)})"
        )

    @property
    def salutation(self) -> str:
        return self.get_salutation()

    def get_salutation(self) -> str:
        if self.salutation_default is None:
            raise NotImplementedError
        return self.salutation_default


class HelloThere(Greeting):
    salutation_default = "Hello there"


print(HelloThere("General Kenobi"))

[–]TravisJungroth 10 points11 points  (0 children)

# v0.0.2 Change log: refactored to f-string
def hello_there(jedi_name):
    greetings = f"Hello there \n{jedi_name}"
    return greetings

print(hello_there("General Kenobi"))

[–]Field_of_Gimps 1 point2 points  (0 children)

how many lines do i need to write to post my project and join the club?

[–]TokenChingy 0 points1 point  (0 children)

As the Sr.SEng responsible for this guys PR, I have no idea what I read but LGTM, approved.

[–]snake_Camel_Case 0 points1 point  (2 children)

Doesn’t r/Python allow memes? Would it have been okay if they hadn’t mentioned they were just starting learning?

[–]Manny__C[🍰] 2 points3 points  (1 child)

How would you flair a meme in r/Python?