use object method without initializing object

Reckoner reckoner at gmail.com
Tue Apr 15 11:27:21 EDT 2008


would it be possible to use one of an object's methods without
initializing the object?

In other words, if I have:

class Test:
  def __init__(self):
      print 'init'
  def foo(self):
      print 'foo'

and I want to use the foo function without hitting the
initialize constructor function.

Is this possible?



More information about the Python-list mailing list