Reference: Party

exception party.DontHaveThatDrink[source]

This is thrown when someone asks for a drink not supplied.

exception party.EveryoneHasPartyHat[source]

This is thrown when everyone has managed to get their hat on.

exception party.OutOfThatDrink[source]

This is thrown when someone asks for a drink whose supply has been exhausted.

class party.Party(attendees=None, **kwargs)[source]

A programmatic representation of a party. Accepts the following parameters:

  • attendees (numeric)
  • beers (numeric)
  • sangrias (numeric)
  • wines (numeric)
  • lemonades (numeric)


If you don’t supply a value for any of the parameters, the Party will act like all parties do and these parameter will show up in random quantities.


Drink an available substances specified in VALID_DRINKS constant


Display an inventory of guests and available drinks


Put a hat on an attendee


Use this function to hold a completely party.