Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for I Love Python! by ipadla
#--------------
# title: i_love_python()
# description: how did i find python, a short essay
# version: 0.01
#--------------
def i_love_python():
myJob = 'FoxPro db-systems configuration'
myMood = 'fear and sorrow'
myThoughts = 'myLife is broken'
myWish = 'be a jedi-coder'
for day in range(0, 1095): # 365*3.. damn, almost 3 years of life..
if i_have_a_plan():
break # stop doing a shit
else:
pass
hope = thinkAboutNewWay()
if hope:
way = find_new_way()
return way
#-------------------------------------------------------------------------------
# function imitates activity
def i_have_a_plan():
work_harder = """
TRY
Object.Responsible = SessionParameters.CurrentSeller;
EXCEPT
Object.Responsible = SessionParameters.CurrentUser;
ENDTRY;
// dunno why but everybody do that
IF NOT ValueIsSet(Object.Responsible) THEN // so do i...
Object.Responsible = SessionParameters.CurrentUser;
ENDIF; """
#-------------------------------------------------------------------------------
# heretic function
def thinkAboutNewWay():
return True
#-------------------------------------------------------------------------------
# if you do this there will be no way back for you!
def find_new_way():
return "I love Python!"
#-------------------------------------------------------------------------------
# tests
if __name__ == '__main__':
assert i_love_python() == "I love Python!"
Jan. 21, 2016