On Sep 7, 1:06 pm, Bruno Desthuilliers <bdesth.quelquech...@free.quelquepart.fr> wrote:
> try: > return Model.objects.get(pk=42) > except Model.DoesNotExist: > return sentinel Visual Basic Classic had a Collection Class, which worked essentially like a real language's Hash, Map, or Dict. Except - it had no operation to test membership. It also could not enumerate by key and value (which would be 'for k,v in dict.items()'). To test for membership, you _had_ to catch an exception - using VB's tragically clumsy exception model. Hours of fun. That leads us to this topic: http://www.google.com/search?q=don't+use+exceptions+for+normal+control+flow -- http://mail.python.org/mailman/listinfo/python-list