from aspen import Response
from gittip.models import Participant

# ========================================================================== ^L

if user.ANON:
    raise Response(404)

new_participant_id = request.body['participant_id']

try:
    user.change_id(new_participant_id)
    response.body = {"participant_id": new_participant_id}
except Participant.IdContainsInvalidCharacters, Participant.IdIsRestricted:
    raise Response(400)
except Participant.IdAlreadyTaken:
    raise Response(409)
except Participant.IdTooLong:
    raise Response(413)

from aspen import Response
from gittip.models import Participant

# ========================================================================== ^L

if user.ANON:
    raise Response(404)

new_participant_id = request.body['participant_id']

try:
    user.change_id(new_participant_id)
    response.body = {"participant_id": new_participant_id}
except (Participant.IdContainsInvalidCharacters, Participant.IdIsRestricted):
    raise Response(400)
except Participant.IdAlreadyTaken:
    raise Response(409)
except Participant.IdTooLong:
    raise Response(413)

Correct syntax for capturing multiple exceptions.
Correct syntax for capturing multiple exceptions.
