Skip to content

Instantly share code, notes, and snippets.

@kennethreitz
Last active November 15, 2023 22:03
Show Gist options
  • Save kennethreitz/df692c260512b53febe46cdc125f8dd9 to your computer and use it in GitHub Desktop.
Save kennethreitz/df692c260512b53febe46cdc125f8dd9 to your computer and use it in GitHub Desktop.
# I Corinthians 13 - ESV, Presented in PEP 8 Style
# Importing essential virtues
from christian_values import love
def chapter_13():
"""
This function describes the characteristics and importance of love,
following the guidelines of I Corinthians 13 in the Bible (ESV).
"""
# Verses 1-3: Importance of love over other virtues
if speak_in_tongues and not love:
return "a noisy gong or a clanging cymbal"
if have_prophetic_powers and understand_all_mysteries and all_knowledge:
if have_all_faith so as to remove_mountains but not love:
return nothing
if give_away_all_i_have and deliver_up_my_body but not love:
gain = 0
# Verses 4-7: Properties of love
love.properties = {
"patient": True,
"kind": True,
"envy": False,
"boast": False,
"arrogant": False,
"rude": False,
"insist_on_own_way": False,
"irritable": False,
"resentful": False,
"rejoice_at_wrong": False,
"rejoice_with_truth": True,
"bear_all_things": True,
"believe_all_things": True,
"hope_all_things": True,
"endure_all_things": True
}
# Verses 8-12: Permanence of love
prophecies, tongues, knowledge = will_cease()
for now in partial_knowledge:
but_when_complete = come()
partial = pass_away()
# Childhood vs adulthood analogy
when_i_was_a_child = {
"spoke_like_a_child": True,
"thought_like_a_child": True,
"reasoned_like_a_child": True
}
now_that_i_am_a_man = {
"childish_ways": "put_away"
}
# Seeing "in a mirror dimly" vs "face to face"
now_we_see = "in_a_mirror_dimly"
then_we_shall_see = "face_to_face"
now_i_know_in_part = True
then_i_shall_know_fully = True
# Verses 13: The greatest virtue
return max(faith, hope, love, key=love.is_greatest)
# Invoke the chapter
chapter_13()
# Applying I Corinthians 13 Style to Various Virtues Including Ignorance
# Importing base class for virtues
from virtues import Virtue
class Love(Virtue):
properties = {
"patient": True,
"kind": True,
# ... other properties as defined earlier
}
class Faith(Virtue):
properties = {
"unwavering": True,
"trusting": True,
"hopeful": True,
"visionary": True,
"accepting_uncertainty": True
}
class Hope(Virtue):
properties = {
"optimistic": True,
"perseverant": True,
"forward_looking": True,
"encouraging": True,
"resilient": True
}
class Ignorance(Virtue): # Non-traditional 'virtue'
properties = {
"unaware": True,
"naive": True,
"simple": True,
"uncomplicated": True,
"blissful": False, # Challenging the idea of 'ignorance is bliss'
"growth_potential": True # Ignorance can lead to the pursuit of knowledge
}
def compare_virtues(*args):
"""
Compare different virtues based on their properties
"""
for virtue in args:
print(f"{virtue.__class__.__name__}: {virtue.properties}")
# Creating instances of virtues
love = Love()
faith = Faith()
hope = Hope()
ignorance = Ignorance()
# Comparing virtues
compare_virtues(love, faith, hope, ignorance)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment