On 20.06.2012 20:02, Szymon Wróblewski
wrote:
Hi if you go with this pattern then I would suggest to avoid 'isinstance(...)'. I would suggest to do it like the key events in pygame: if e.type == pygame.KEYDOWN: if e.key == pygame.K_ESCAPE: # react So my suggestion would be something similar for networking packets: if e.type == pygame.NETWORK: if e.packet_type == echo: # do whatever needs to be done here Maybe there is a better name for 'packet_type' ~DR0ID |