On Tue, 7 Aug 2001 10:01:24 +0200, "Alex Martelli" <aleaxit / yahoo.com>
wrote:

>"Phil Tomson" <ptkwt / shell1.aracnet.com> wrote in message
>news:X2Jb7.24637$C7.9671673 / e3500-chi1.usenetserver.com...
>    ...
>> Questions for the Ruby community to ponder: What sorts of features do we
>> need that might be unique to Ruby?  [One that comes to mind: the ability
>> to extend an existing class.]  For the
>
>In what sense is this "unique to Ruby"?  The following works in Python:

<code>

># and now you can call anInstance.two(), having
># extended existing class Existing "after the
># fact" -- already-created instances also get
># to use the 'extensions' to the class.

He might be talking about the way you can reopen and extend existing
_built_in_ classes in Ruby, for example:

class Regexp
  alias oldcomp =~
  def =~ (astring)
     match(astring)[1..9]
  end
end

....Regexp being part of the standard library.  Can you do this in
Python?  It would be nice...

-- 
tom / alkali.spamfree.org
remove 'spamfree.' to respond