From: Elliot Temple Date: 2006-07-09T14:22:12+09:00 Subject: Re: Why Ruby over Python? On Jul 8, 2006, at 9:49 PM, Elliot Temple wrote: > > On Jul 8, 2006, at 9:40 PM, richardun@gmail.com wrote: > >> I love Ruby because I can do this: >> >> class Integer >> def even? >> ( self % 2 ) == 0 >> end >> end >> >> puts 3.even? >> puts 28.even? > > I don't know if that's possible in Python, but apparently I can't > guess how to do it based on a little previous Python usage: > OK now I think you can't do it: >>> list.x = 5 Traceback (most recent call last): File "", line 1, in ? TypeError: can't set attributes of built-in/extension type 'list' -- Elliot Temple http://www.curi.us/blog/