Being educated under Java background, static method and class method are the same thing.
But not so in Python, there is subtle difference:
Say function a() is defined in Parent Class, while Sub Class extends Parent Class
If function a() has @staticmethod decorator, Sub.a() still refers to definition inside Parent Class. Whereas,
If function a() has @classmethod decorator, Sub.a() will points definition inside Sub Class.
Let’s talk about some definitions here:
@staticmethod function is nothing more than a function defined inside a class. It is callable without instantiating the class first. It’s definition is immutable via inheritance.
@classmethod function also callable without instantiating the class, but its definition follows Sub class, not Parent class, via inheritance. That’s because the first argument for @classmethod function must always be cls (class).
“I was generating working code nearly as fast as I could type. When I realized this, I was quite startled.”
“in Python, I was actually dealing with an exceptionally good design. Most languages have so much friction and awkwardness built into their design that you learn most of their feature set long before your misstep rate drops anywhere near zero. Python was the first general-purpose language I’d ever used that reversed this process.”
“So the real punchline of the story is this: weeks and months after writing fetchmailconf, I could still read the fetchmailconf code and grok what it was doing without serious mental effort.”
“the Python paradox: if a company chooses to write its software in a comparatively esoteric language, they’ll be able to hire better programmers, because they’ll attract only those who cared enough to learn it.“
Kamaelia is not yet another Rails-esque framework, thus making it more interesting.
Kamaelia is open source framework for building concurrent system. It was conceived inside BBC.co.uk r & D lab. It is written in Python, making it double interesting.
It draws its inspiration from UNIX pipeline. UNIX pipe allows chaining processes so that the output of current process goes directly to the input of the next process. The ‘pipeline’ module is called Axon.
From its documentation, Kamaelia is more like collection of components. The components comprises a lot of thing; TCP server/client, GUI builder, Audio codec, IRC client, etc…
With ZHPY(zippy) one can use a fully featured Python language in simplify or traditional Chinese.
From the project’ description, it uses pyparsing to detect Chinese keywords, class names, methods, arguments, and variables and translate them back to Python.