Possible PEP: Improve classmethod/staticmethod syntax
Skip Montanaro
skip at pobox.com
Wed Jun 4 12:02:45 EDT 2003
>>>>> "Michael" == Michael Chermside <mcherm at mcherm.com> writes:
Michael> I don't think either awkward workaround is necessary. It seems
Michael> to me that you could use something like this:
Michael> def foo(...) [precondition(foo_pre), postcondition(foo_post)]:
Michael> <normal code here>
Michael> Notice that precondition and postcondition are functions that
Michael> take in one function as an argument and give out a function
Michael> which can be applied to foo to give foo-prime.
There ya go. My original post contained this disclaimer:
(FYI, the above is just right off the top of my sleep-starved brain.
I'm sure it's full of holes.)
Skip
More information about the Python-list
mailing list