Metaclasses & docstrings in 2.2

Jeremy Bowers jerf at jerf.org
Tue Jul 23 01:19:31 EDT 2002


On Mon, 22 Jul 2002 23:00:59 -0500, I wrote:
> class M1:
> 	"M1's docstring."
> 	def __init__(cls, name, bases, dict):
> 		pass

Ah. Moron source located.

class M1(type):
	"M1's docstring."
	def __init__(cls, name, bases, dict):
		suprt(M1, cls).__init__(name, bases, dict)

will work as I expected and do the right thing.

It's even cooler when it works right.



More information about the Python-list mailing list