Re: Why not Ruby?

2009-01-01 Thread Paul Rubin
Steven D'Aprano writes: > You don't think Python's dict implementation is functional? I'm using the term "functional" in the sense of Chris Okasaki's book "Purely Functional Data Structures". Basically a functional dictionary is an immutable dictionary that supports fast "update" operations by

Re: Why not Ruby?

2009-01-01 Thread Paul Rubin
Marek Kubica writes: > > I guess if it is functional then every mutation must copy and return a > > new data structure? Yes. > > (Which will be much more efficient in Haskell than > > in Python - Haskell can share most of the underlying data whereas Python > > would have to create a new dict ev

Re: mod_pylite?

2009-01-01 Thread Graham Dumpleton
On Jan 2, 2:28 pm, excord80 wrote: > On Jan 1, 9:12 pm, s...@pobox.com wrote: > > >     > > >>http://broadcast.oreilly.com/2008/12/five-features-perl-5-needs-now.html > > >     >> and he mentions a neat-looking project called ``mod_perlite``. It > >     >> sounds like it will be very handy. Anyon

Re: initialization in python

2009-01-01 Thread koranthala
On Jan 1, 11:14 pm, Terry Reedy wrote: > koranth...@gmail.com wrote: > >>> Module database: > >>> ^^^ > >>> Session = None > > 'Initializing' names is not necessary.  Delete this.  Without it, your > error would be more obvious. > > >>> def init(dbname): > >>>    engine = create_en

Switching user in a SSH connection

2009-01-01 Thread Shah Sultan Alam
Hi Group, I am trying to connect to a Linux maching using paramiko. and able to run a command like "ls -l" Now I want to switch user being in the connection ( eg running something like "su -" ) Will you please let me know how to do that. Regds Shah -- http://mail.python.org/mailman/listinfo/p

Re: Why not Ruby?

2009-01-01 Thread r
On Jan 1, 7:38 pm, Steven D'Aprano wrote: > On Thu, 01 Jan 2009 10:35:54 -0800, r wrote: > > the use of "end" in a language as > > high level as Ruby is redundant, and idiotic. There are a few things > > about Ruby i really like, but this "end" business is blasphemy. > > "Blasphemy"? > > You reall

Re: type conversion

2009-01-01 Thread r
On Jan 1, 4:40 pm, Robert Kern wrote: > Hamish McKenzie wrote: > > sometimes I want to be able to initialize an instance with a variety of > > different data types. > > > as an obvious example I might want to initialize a 4x4 matrix with either > > 16 floats, a list/tuple or 16 floats, another m

<    1   2