4 ms·
This doesn't impress me at all. Python code is supposed to look sexy, and it does, when well-written. A code of 73 lines with inlined semi-collons is no better
by munchor 15y ago
This doesn't impress me at all. Python code is supposed to look sexy, and it does, when well-written.
A code of 73 lines with inlined semi-collons is no better than a 200 lines code. In fact, the 200 lines is better if one wants to understand the code.
import pygame,time,random,sys,copy,os;from pygame.locals import ;t2=0;nor=0;pg=pygame;pd=pg.display;cdc=copy.deepcopy;pc=[[[1,1],[1,1]],[[1,0],[1,0],[1,1]],[[0,1],[0,1],[1,1]],[[1],[1],[1],[1]],[[0,1,1],[1,1,0]],[[1,1,0],[0,1,1]],[[1,1,1],[0,1,0]]];cols=[(0,0,0),(100,100,100),(10,100,225),(0,150,220),(0,220,150),(60,200,10),(180,210,5),(210,180,10),(100,200,170)];pg.init();pd.set_mode((320,240),FULLSCREEN);sk=pd.get_surface();f=[[1]+[0 for x in range(8)]+[1] for x in range(19)]+[[1 for x in range(10)]];of=cdc(f);s=12;brt=Rect((100,0,s,s));b=-1;p=[];lc=[-9,0];t=0;bt=60;pg.key.set_repeat(200,100);rh=0;cr=[];crs=pg.Surface((8s,s));crs.fill((255,0,0));crs.set_alpha(100);gv=-1;z=pg.font.Font("c.ttf",14);_=0;pg.mixer.music.load("t.ogg");pg.mixer.music.play(-1)
Is that a proper line of code? No.
- cabalamat 15y ago> A code of 73 lines with inlined semi-collons is no better than a 200 lines code You mean: a program of 73 lines with inlined semi-colons is no better than a 200 lines program Code is a mass noun (as is software, BTW). Program is a count noun.
- zokier 15y agoWell, it expands to 155 lines when newlines are inserted in "normal" places (replacing semi-colons and after if statements mostly). Which is still imho fairly neat.