[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Poor efficency of Ruby...
From:       Bill Atkins <batkins57 () gmail ! com>
Date:       2005-03-31 14:11:39
Message-ID: 66b7e34b05033106111a287223 () mail ! gmail ! com
[Download RAW message or body]

You are indeed correct.  My mistake.  I have never actually written
any libraries in python, but had never seen Python do this when
compiling scripts (that is, files that didn't get imported).

Bill Atkins

On Thu, 31 Mar 2005 21:44:50 +0900, JZ <spamerom@niet.com> wrote:
> Dnia Thu, 31 Mar 2005 18:34:17 +0900, Bill Atkins napisał(a):
> 
> >> No. Python *automatically compiles* every imported module. It is the
> >> feature of the language.
> >
> > Er.  Not true.  When you load a file in Python, it is interpreted and
> > becomes part of the current program.  It isn't compiled to bytecode so
> > that the bytecode can be used next time for faster load.
> 
> This is *not true*. Did you check it? I bet you don't.
> 
> > dir
> 2005-03-31  14:37    <DIR>          .
> 2005-03-31  14:37    <DIR>          ..
> 2005-03-31  14:36                16 file1.py
> 2005-03-31  14:37                27 file2.py
> 
> > type file1.py
> x = "I'm file 1"
> 
> >type file2.py
> import file1
> print file1.x
> 
> > file2.py
> > I'm file 1
> > dir
> 2005-03-31  14:37    <DIR>          .
> 2005-03-31  14:37    <DIR>          ..
> 2005-03-31  14:36                16 file1.py
> 2005-03-31  14:37               163 file1.pyc
> 2005-03-31  14:37                27 file2.py
> 
> As you can see, file1.pyc is created automatically. Check it. You are wrong
> for sure.
> 
> --
> JZ
> 
> 


-- 
$stdout.sync = true
"Just another Ruby hacker.".each_byte do |b|
  ('a'..'z').step do|c|print c+"\b";sleep 0.007 end;print b.chr
end; print "\n"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic