Ok, its still myPong game and another problem.I tried implementing pause in the game, but it does not work consistently. I have to try 10-15 times to actually pause a game.I suppose the problem is connected with Pygame Key.set_repeat

pygame.key.set_repeat(5,5)

that I coded to be able to move paddle by holding arrow keys without pressing them continuosly.

You are correct in that set_repeat() is causing you headache. What is happening is that every time you press the spacebar to pause, it is actually pausing many times in a row. It is taking you several tries to actually land on a paused state. I would recommend you either poll keys for paddle movement, or keep track of paddle velocity when using the event based input handling.

Hmmm, I have not been aware there is event based and polling based method for processing input. I am lacking in this knowledge, so if you or anyone can expand on this topic, or give a good link...Anyway, thanks a lot dmreichard

An easy way to think about event-based vs polling in this context is being reactive vs proactive, respectively. For example, when you press or release a key this adds an event corresponding to that action in the pygame event queue. One normally retrieves the event queue and then interates through it for events they are interested in capturing. You are therefore reacting to the event.

Polling is the opposite of being reactive. You are basically on each iteration of the game loop saying, "Is this key being pressed right now?" as opposed to "Did this key get pressed?"

There are many resources on the uses and benefits of each, and a google search should turn up useful information.

I found the actual pygame API reference located at http://www.pygame.org/docs/ to be most beneficial versus any tutorial on pygame for explaining the library itself.