In pygame I can use pygame.mixer.music to load and play long audio files (by streaming), or pygame.mixer.Sound & pygame.mixer.Channel for shorter ones (that are loaded entirely into memory) - as I understand correctly.
I'd like to use both of these methods. However I'd also like to know, when playback of given Channel or Music has just finished. There are methods for that: set_endevent() - on both music and channel. When I use pygame.locals.USEREVENT as a type of event, when channel's playback is finished i receive event with code == <channel_id>. When music's playback is finished, code is always 0. Thus I cannot tell the difference, whether it is music that stopped, or channel with id 0.
Is there any way to tell them apart?
-.- I misunderstood the documentation. There is said:

The type argument will be the event id sent to the queue. This can be any valid event type, but a good choice would be a value between pygame.locals.USEREVENT and pygame.locals.NUMEVENTS. If no type argument is given then the Channel will stop sending endevents.

And I understood I should choose either USEREVENT or NUMEVENTS. I was constantly looking for a way to use some new event types but I thought it is impossible. So I chose USEREVENT, hoping that no other pygame module uses it, and thinking it's better than NUMEVENTS.
But then I came up with idea, that maybe these types are just numbers and "between" means literally between. So after I checked it appeared that USEREVENT == 24 and NUMEVENTS == 32. So I can basically use any number from 25 to 32...
Silly me. :)
Only one thing remain: let's take that I used 25 as type for Channel.set_endevent(). How to get my channel id now?

Edit:
Ok, now I have a full image. It's even better - I think. If I understand correctly: pygame.USEREVENT (equal 24) is the first of many events up to pygame.NUMEVENT (equal 32). Any of them have an attribute code that can be used for whatever I want (and Channel uses it to put its id). So basically I can use pygame.USEREVENT + 0 for channels and pygame.USEREVENT + 1 for music.
Correct me please if I'm wrong.
How to differentiate endevent of music and channel?