[Python-Dev] Re: decorators and 2.4

Jewett, Jim J jim.jewett at eds.com
Mon Jun 28 14:03:23 EDT 2004


> This works with the proof-of-concept code I posted

Apparently I clipped too much.

With your proof-of-concept, one of your suggestions 
was using names like 

	classmethod_follows()

My intent was to say:

"Whatever method does become standard -- either in C, 
or through adding your code to stdlib -- I want some
way for a reader to know quickly that a function is
being decorated."

Therefore I do not want "better names" like

	classmethod()
	def foo():
		pass

because then various decorators will have nothing in 
common, except for the invisible fact that they they
share a common base class.

	decorators(classmethod())
	def foo(): 
		pass

is OK, and

	[classmethod()]
	def foo():
		pass

might be, because the "[]\n" or "decorators(...)" warn the
reader about what is happening.

-jJ





More information about the Python-Dev mailing list