On 2/7/11 5:57 PM, Jeff Johnson wrote:
> I don't know.  That just struck me as an interesting quote.  I find
> myself thinking about it!
>
> Sometimes it's better to ask forgiveness than permission.

When you think about it, asking forgiveness instead of permission is probably 
human 
nature. Look at speed limits, and the tendency for even otherwise law-abiding 
citizens to break them, even by a little, because it is safer to go with the 
flow.

For some reason I thought this was part of the Zen of Python, but I just 
checked (by 
typing 'import this' into a python interpreter) and it isn't, but it comes from 
the 
Python coding style of not doing this:

def getChildName(obj):
        if obj and getattr(obj, "child", None) is not None:
                return obj.child.name
        return None

But this:

def getChildName(obj):
        try:
                return obj.child
        except (ValueError, AttributeError):
                return None

You don't test all possible things that can go wrong first, you just try to do 
what 
you want to do, and catch expected exceptions and handle them. Asking for 
forgiveness 
makes the expected cases execute faster.

And yes, I agree with Ted and Ed that Lou should just install source control to 
his 
machine without telling anyone at first. But if he isn't allowed to install 
software 
to his machine, he really does need to consider walking! :)

Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to