CoddityTeam / movaicode

Concours mensuel du Pire Développeur de France
122 stars 10 forks source link

[movai-code/4] serpentonic #110

Open To-om opened 3 years ago

To-om commented 3 years ago

Je ne suis pas peu fier de ma version en python. Je trouve qu'on frôle la perfection.

from io import TextIOWrapper as tib
import subprocess as st

myBFF = "Jean-BFF <3"

# initialisation de la machinerie
_c=chr;_o=ord;w=tib.write;c = tib.close;then = "\n";o=open;v="w";o2="tmp";in_my_class  = '/'
doit = lambda c,o: _c(o(_o(c)))
addTwo = lambda c: doit(c, lambda u: u -2)
split2 = lambda c: doit(c, lambda u: u * 2)
_ = lambda c1, c2, c3: st.run([c1, c2, c3]).returncode

# construction du constructeur de la classe
myBFF=split2(in_my_class)+myBFF
itshouldnotexist="itshouldnotexist"
is_there = addTwo(itshouldnotexist[0]) + addTwo(itshouldnotexist[1]) + "ep"
in_my_class+=o2+in_my_class+itshouldnotexist
eleves=o(in_my_class,v)
add = lambda x, and_then: 0 if x == in_my_class else w(eleves, x) if x == then else w(eleves, x) + add(then, and_then)
and_then_add=add
myBFF+=addTwo('&')

# construction de la classe
add("Charles-Nicolas",
  and_then_add("Jean-BFF <3",
    and_then_add("Milène",
      and_then_add("Kevin", in_my_class))))
c(eleves)

# cherchage de mon BFF dans la classe
print("Ma life est foutue") if _(is_there, myBFF, in_my_class) else print("J'suis trop content il y a mon BFF")
mehdi-dalil commented 3 years ago

"Ca passe les tests unitaires"

Matthieu-Coddity commented 3 years ago

"la machinerie" :)

eleissor commented 3 years ago

Magnifique ;)