David M Chess於 2013年4月12日星期五UTC+8下午11時37分28秒寫道: > > Roy Smith <r...@panix.com> > > > > > > As part of our initial interview screen, we give > applicants some small > > > coding problems to do. One of the things we see a lot is what > you could > > > call "Java code smell". This is our clue that the > person is really a > > > Java hacker at heart who just dabbles in Python but isn't really fluent. > > > > ... > > > It's not just LongVerboseFunctionNamesInCamelCase(). Nor is > it code > > > that looks like somebody bought the Gang of Four patterns book and > is >
> > that maybe there's a class struggling to be written. > > > > And I think equally to the point, even if you have > only data, or only functions, right now, if the thing in question has that > thing-like feel to it :) you will probably find yourself with both before > you're done, so you might as well make it a class now... > > > > DC If it is not time-critical and no needs to convert into CYTHON then it does not matter too much. But a well wrapped class structures with good documents can help others to use the python codes a lot. If the part is intended to be time-critical in the low level part, then avoiding seeking 4 levels of methods and properties inside a loop is helpful in python programs to be executed in the run time. -- http://mail.python.org/mailman/listinfo/python-list