Re: [Pyobjc-dev] Calling methods on nil
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-05-06 16:38:40
|
Dinu Gherman wrote: > Well, let's not try to impose anybody's definition of what "pythonic" > means to any group of people, like future Pythonistas coming from the > Cocoa camp. > > In fact, I still haven't found a good definition of what it means to > be "pythonic"... which is maybe good, because many great things lack > a good, satisfactory definition. Of course, there is no formal definition of "pythonic", there there is the list from "import this", the most well known (as well as abused) one is "Explicit is better than implicit". Also appripriate is In the face of ambiguity, refuse the temptation to guess. as well as Errors should never pass silently. > Saying something is pythonic, because it was in Python 0.x is probably > not enough as we can see with Booleans, say, which were doomed to be > evil until Python 2.2, or so. Sending messages to nil makes little sense in Python, as calling a method is always a two-step procedure: 1) get the bound method, 2) call the bound method. The fact that to emulate sending arbitrary messages to nil you need to create dummy bound method objects should (but apparently doesn't, to you ;-) clearly demonstrate that this does not fit the way Python _works_. IMO it has little to do with what is perceived to be Pythonic. > Wonderful-topic-for-a-discussion-fueled-by-Belgian-beer-;-)'ly, Sure thing ;-) Just |