From: Idan Sofer Date: 2003-03-20T23:35:35+09:00 Subject: Re: Strong advantages over Python Greg McIntyre wrote: >would be one focus of the lecture. But I'm interested in specific >examples where the equivalent Python code is significantly more >difficult. > > Perhaps situation when you wish to do method run-time optimization. suppose: class Foo def parse() [...] def self.data() @data end end def data() File.open ("data.txt") do |file| self.parse(file.read) end end end data.txt is read only once per instance, but no run-time check(if @data) is needed, Foo#parse just rewrites Foo#data at runtime as singleton method. There no such kind of technique in python AFAIK.