[Tutor] bound vs. unbound method?

Kirby Urner urnerk@qwest.net
Wed, 21 Nov 2001 09:26:37 -0800


Note that in Python 2.2 we're starting to get static
methods, i.e. methods which don't need a self or
instance to work:

  >>> class C:
	def m(a):
	  print a
	m = staticmethod(m)

	
  >>> C.m(5)
  5
  >>> o = C()
  >>> o.m(5)
  5

Guido thinks the syntax is a bit ugly -- dunno if
it's gonna change.

Kirby