Skip to content

Instantly share code, notes, and snippets.

View Signez's full-sized avatar

Stanislas Signoud Signez

View GitHub Profile
@Signez
Signez / nightmare.py
Created April 3, 2011 14:31
Et oui, en Python aussi on peut faire du code non maintenable.
# This is a nightmare.
class PlayerStack:
# ...
def liquidload(self):
lstck = self.getSortedWaitingStack()
if (not self.playingElement
or ((self.playingElement.startedAt + self.playingElement.length) - time.time()) < Stack.preload
or (len(lstck) > 0 and isinstance(lstck[0], Action) and lstck[0].directOnly == True)):
if len(lstck) == 0:
self.state = "stopped"