In article <odji9.4863$3F1.23903 / weber.videotron.net>, Vincent Foley wrote:
>I was discussing with a (Python) friend last night.  I told him that one
>thing I liked better about Ruby than Python was that you could add
>methods to already existing methods.
[...]
>But my friend told me that Python didn't have that because it was not a
>good thing and it was not the proper way to do it.  He said that the
>true way of doing it, is to subclass (since Python 2.2 can now subclass
>builtin types) the base class:
[...]

In Python 2.2 (I'm not sure how long Python has been able to do this) you
can do
	class Foo:
	    def hello(self, x):
	    	print "hello", x

	def goodbye(self, x):
		print "goodbye", x

	Foo.goodbye = goodbye

	f = Foo()
	f.goodbye("bob")