Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] SWIG and rlcompleter

Raymond Hettingerraymond.hettinger at verizon.net
Wed Aug 17 02:55:26 CEST 2005


[Michael Hudson]> I wonder if dir() should strip non-strings?-0  The behavior of dir() already a bit magical.  Python is much simplerto comprehend if we have direct relationships like dir() and vars()corresponding as closely as possible to the object's dictionary.  Ifsomeone injects non-strings into an attribute dictionary, why shoulddir() hide that fact?Likewise, we would have been better-off if ceval.c didn't pre-processdata before handing it off to API functions (so that negative indicesget handled the same way in operator module functions and in userdefined methods, etc). Both Io and Lua have made a design principle out of keeping theserelationships as direct as possible (i.e. a[b] always corresponds to thecall a.__getitem__(b) with no intervening magic, etc.).<begin side-topic-rant>The auto-exposure on my camera takes in nine data points and guesseswhether the subject is backlit, whether there is a mix of light anddark, whether it is more important avoid blown highlights or to missshadow detail, etc.  The good news is that it often makes a decentguess.  The bad news is that I've completely lost the ability to predictwhether I've gotten a good shot based on the light conditions and camerasettings.  IOW, if you make the tools too smart, they become harder touse.  Leica had it right all along.<end side-topic-rant>Raymond


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp