Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Mike Meyer
"iK" <[EMAIL PROTECTED]> writes: > Seems like he wants python programmers to solve their problems all in the > same way. While that is great for corporate slaves it is terrible for the > creative programmer. No, he wants Python to be Pythonic. TMTOWTDI is not Pythonic. > Python is quickly beco

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-07-01 Thread Scott David Daniels
Delaney, Timothy (Tim) wrote: > Grant Edwards wrote: > > >>On 2005-06-30, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote: >> >> Due to some wierd property requiring conservation of >> consonants, when speaking Strine you've got to take the r's >> removed from words like "carrier" and "order", a

Re: Assigning to None

2005-07-01 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> Yes. I once grabbed an old program that did assignments to None. But >> that's always been a bad idea. > What was the use case!? Unpacking a tuple. Something like this: (foo, bar, None) = gen_tuple(stuff) I've never seen

Re: Re:

2005-07-01 Thread Skip Montanaro
Adriaan> I'm not a very experienced Python programmer yet, so I might be Adriaan> mistaken, but there are a few things that would make me prefer Adriaan> C++ over Python for large (over 500.000 LOC) projects. Adriaan> - namespaces Python's go packages, modules, classes. Plenty o

Re: Favorite non-python language trick?

2005-07-01 Thread Pekka Karjalainen
In article <[EMAIL PROTECTED]>, Joseph Garvin wrote: >I'm curious -- what is everyone's favorite trick from a non-python >language? And -- why isn't it in Python? > Being able to use my native language without a hitch when naming my variables &c. Java allows that because it supports almost any

Re:

2005-07-01 Thread Mike Meyer
Harry George <[EMAIL PROTECTED]> writes: >> > - more available libraries and more advanced developement tools. > If the library is in C, C++, or FORTRAN, Python can use it. Worst > case you have to write your own bindings. Are there really that many more libraries for C++? I'm not talking about d

Re: shelve in a ZipFile?

2005-07-01 Thread Scott David Daniels
Terry Hancock wrote: > I only just recently had a look at the shelve module > That would be handy if, for example, I wanted to couple > (and compress into the bargain) by putting my two > shelf files into a single zip archive. You are, however, fooling yourself if you think a shelve solution c

Re: map vs. list-comprehension

2005-07-01 Thread Stelios Xanthakis
Mandus wrote: > jepp - faster, but still slower than the map. > > 100 iterations: > zip+list-comprehension: 8.1s > izip+list-comprehension: 7.5s > map: 7.0s > Strange. On 2.4.1 izip is the fastest. The thing is that if you put benchmark code in global the results are not fair as each var

Re: Accepted Summer of Code proposals

2005-07-01 Thread Terry Reedy
"A.M. Kuchling" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > For anyone who's interested: the Python wiki now contains a list of the > PSF-mentored proposals that were accepted for Google's Summer of Code: > http://wiki.python.org/moin/SummerOfCode Thanks for posting this and th

Re: importing packages from a zip file

2005-07-01 Thread Dieter Maurer
Scott David Daniels <[EMAIL PROTECTED]> writes on Wed, 29 Jun 2005 10:36:29 -0700: > Peter Tillotson wrote: > ... > > from myZip.zip import myModule.py > > > Does this work for you? It gives me a syntax error. > > Typically, put the zip file on the sys.path list, and import modules > and packa

Re: Regular Expression for pattern substitution

2005-07-01 Thread Devan L
Hrm, thought it had one. Guess it would help if I actually used regular expression for replacement. -- http://mail.python.org/mailman/listinfo/python-list

Re: Running Python interpreter in Emacs

2005-07-01 Thread Piet van Oostrum
> "Rex Eastbourne" <[EMAIL PROTECTED]> (RE) wrote: >RE> I went to My Computer | Properties | Advanced | Environment Variables >RE> and added c:\program files\python24 to both the PYTHONPATH and Path >RE> variables. Still no luck. I don't know whether the path I'm talking >RE> about is the same

Re: I have a question.

2005-07-01 Thread Nathan Pinno
Thanks all. I needed to ask because I'm writing a couple of programs which require the computer to choose numbers at random thanks. Nathan Pinno "Jeremy Jones" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Nathan Pinno wrote: > > > Hi all, > > > > Does Python

Re: map vs. list-comprehension

2005-07-01 Thread Scott David Daniels
Roy Smith wrote: > Look at what happened to C when it mutated into C++. In isolation, most of > the features of C++ seem like good ideas. Taken together, it's a huge > hairy mess that most people only understand increasingly larger subsets of. > Fred Brooks called it the second system syndrom

Re: Re:

2005-07-01 Thread Andreas Kostyrka
Am Freitag, den 01.07.2005, 13:50 +0100 schrieb Tom Anderson: > On Fri, 1 Jul 2005, Adriaan Renting wrote: > > > I'm not a very experienced Python programmer yet, so I might be > > mistaken, but there are a few things that would make me prefer C++ over > > Python for large (over 500.000 LOC) pro

Re: Assigning to None

2005-07-01 Thread Roy Smith
>Peter Hansen <[EMAIL PROTECTED]> writes: > >> Mike Meyer wrote: >>> Yes. I once grabbed an old program that did assignments to None. But >>> that's always been a bad idea. >> What was the use case!? > >Unpacking a tuple. Something like this: > > (foo, bar, None) = gen_tuple(stuff) I can

Re: class attribute to instance attribute

2005-07-01 Thread Devan L
Well, I've never heard of a method like that for assigning variables. I'd rather put it in the __init__ method. -- http://mail.python.org/mailman/listinfo/python-list

Re:

2005-07-01 Thread Philippe C. Martin
Being a C programmer before a C++ I am not certain my opinon qualifies. Yet I have seen myself avoiding C++ contracts lately because I dread going back to that type of work: why use silex when you got a match ? Adriaan Renting wrote: > I'm not a very experienced Python programmer yet, so I m

Re: Assigning to None

2005-07-01 Thread François Pinard
[Roy Smith] > 4) foo, bar = gen_tuple(stuff)[0:1]. In some ways, this is the >cleanest because it doesn't pollute the namespace with an un-needed >variable, but I think it's the least readable. Less legible often means more error prone. For example, here, foo, bar = gen_tuple(stuf

Re: Modules for inclusion in standard library?

2005-07-01 Thread Scott David Daniels
Daniel Dittmar wrote: > Rocco Moretti wrote: Except that (please correct me if I'm wrong) there is somewhat of a policy for not including interface code for third party programs which are not part of the operating system. (I.e. the modules in the standard libary should all be us

Re: nested lists - utter newbie

2005-07-01 Thread Terry Hancock
On Friday 01 July 2005 05:37 am, Benjamin Niemann wrote: > [EMAIL PROTECTED] wrote: > > > Hi, > > why is this possible - > b = [1,2,3] > b[2] = b > b > > [1,2,[...]] > b[2] > > [1,2,[...]] > b[2][2][2][2][2] > > [1,2,[...]] > > > > but this is not - > x = [1,2,x] > > Trace

Re: How to compare files

2005-07-01 Thread Terry Hancock
On Friday 01 July 2005 04:39 am, Lad wrote: > Hi, > What is the best method for comparing two files by words? > I was thinking about reading files by words and compare them but a word > in one file can be linked with a new line character ( \n) > and this '\n' will cause that the words will consider

Re: Assigning to None

2005-07-01 Thread Rocco Moretti
Mike Meyer wrote: > Peter Hansen <[EMAIL PROTECTED]> writes: > > >>Mike Meyer wrote: >> >>>Yes. I once grabbed an old program that did assignments to None. But >>>that's always been a bad idea. >> >>What was the use case!? > > > Unpacking a tuple. Something like this: > > (foo, bar,

Re: Re:

2005-07-01 Thread Roy Smith
Skip Montanaro <[EMAIL PROTECTED]> wrote: >Adriaan> - strong type checking > >Python has strong type checking, it's just dynamic. Writing proper test >cases (which you should be doing anyway) will catch most issues. Not to mention that it's almost farcical for a language which supports reint

Re: Favorite non-python language trick?

2005-07-01 Thread Devan L
With the exception of reduce(lambda x,y:x*y, sequence), reduce can be replaced with sum, and Guido wants to add a product function. -- http://mail.python.org/mailman/listinfo/python-list

Re: LOC in Python and C++ in large projects

2005-07-01 Thread Terry Hancock
On Friday 01 July 2005 07:55 am, Adriaan Renting wrote: > I think it would be interesting if any readers with more experience as I > have would comment on how Python behaves in large projects, and how much > less lines they need compared to C++ or Java. > I have worked on several C++ projects with

Re: map vs. list-comprehension

2005-07-01 Thread Roy Smith
Scott David Daniels <[EMAIL PROTECTED]> wrote: >Roy Smith wrote: >> Look at what happened to C when it mutated into C++. In isolation, most of >> the features of C++ seem like good ideas. Taken together, it's a huge >> hairy mess that most people only understand increasingly larger subsets of.

calldll compiled for Python 2.4 for Windows

2005-07-01 Thread Larry Bates
Does anyone have calldll.pyd compiled for Python 2.4 for Windows? I've made extensive use of it and haven't had the time to go back and convert everything to ctypes. I'd like to upgrade from Python 2.2 but am stuck without this module. BTW, I don't have any C compilers available on my machine. T

Europython 2005 notes online

2005-07-01 Thread Michael Sparks
Back from Europython 2005 - I'd just like to thank all the organisers of Europython this year - it was probably the best conference I've been to - for developers, by developers. Also, for anyone who wasn't able to attend (come next year!), I've taken the majority of the notes I made in the talks I

Re: Favorite non-python language trick?

2005-07-01 Thread TZOTZIOY
On Fri, 24 Jun 2005 21:17:09 GMT, rumours say that Ron Adam <[EMAIL PROTECTED]> might have written: >I think some sort of inline or deferred local statement would be useful >also. It would serve as a limited lambda (after it's removed), eval >alternative, and as a inlined function in some situa

Re: [OT] Better console for Windows?

2005-07-01 Thread TZOTZIOY
On Tue, 28 Jun 2005 14:44:21 +0100, rumours say that Richie Hindle <[EMAIL PROTECTED]> might have written: >Just to take this thread *completely* off-topic: does anyone know of a way >to scroll a Command Prompt window using the keyboard? This comparison page suggests there is no keyboard shortcut

Re: Favorite non-python language trick?

2005-07-01 Thread Rocco Moretti
Joseph Garvin wrote: > I'm curious -- what is everyone's favorite trick from a non-python > language? And -- why isn't it in Python? I'm not aware of a language that allows it, but recently I've found myself wanting the ability to transparently replace objects. For example, if you have a trans

Re: Assigning to None

2005-07-01 Thread François Pinard
[Rocco Moretti] > foo, bar, _ = gen_tuple(stuff) > as '_' is already special cased (last result in interactive mode), and > is already used for "don't care" sematics in Prolog. `_' is also the `gettext' function in internationalised programs. It so seems that `_' is in great demand! :-) -- Fr

Re: Controlling WinAMP (WM_COPYDATA problem)

2005-07-01 Thread TZOTZIOY
On 30 Jun 2005 11:48:31 -0700, rumours say that "The Collector" <[EMAIL PROTECTED]> might have written: >Hi, > >I've been looking for almost two full days now to get full control of >WinAMP using python. Simple play/stop functions are no problem. It's >the WM_COPYDATA that's used by IPC_PLAYFILE (

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Erik Max Francis
Tom Anderson wrote: > So, if you're a pythonista who loves map and lambda, and disagrees with > Guido, what's your background? Functional or not? I'm familiar with several function languages but haven't used them extensively; I was primarily a C++ programmer before I found Python. I definitel

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-07-01 Thread Erik Max Francis
Grant Edwards wrote: > Right, but due to some wierd property requiring conservation of > consonants, when speaking Strine you've got to take the r's > removed from words like "carrier" and "order", and add them to > the ends of other words like Amanda. The distinction is rhotic vs. non-rhotic acc

Re: Accepted Summer of Code proposals

2005-07-01 Thread Erik Max Francis
A.M. Kuchling wrote: > For anyone who's interested: the Python wiki now contains a list of the > PSF-mentored proposals that were accepted for Google's Summer of Code: > http://wiki.python.org/moin/SummerOfCode That's great, it looks like quite a number of useful projects got approved. --

Re: Running Python interpreter in Emacs

2005-07-01 Thread Rex Eastbourne
Yes! Thank you so much! (For some reason, by the way, I had to copy python.exe to my c:/ directory, since the computer could never find the path in program files/python24. But when I did that, and used setq-py-python-command, it worked. I now have python.exe in two locations.) -- http://mail.pyth

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Ron Adam
Tom Anderson wrote: > So, if you're a pythonista who loves map and lambda, and disagrees with > Guido, what's your background? Functional or not? I find map too limiting, so won't miss it. I'm +0 on removing lambda only because I'm unsure that there's always a better alternative. So what woul

Re:

2005-07-01 Thread TZOTZIOY
On Fri, 01 Jul 2005 10:54:03 +0200, rumours say that "Adriaan Renting" <[EMAIL PROTECTED]> might have written: Some thoughts interspersed: >I'm not a very experienced Python programmer yet, so I might be >mistaken, but there are a few things that would make me prefer C++ over >Python for large (o

Re: Programmers Contest: Fit pictures on a page

2005-07-01 Thread Brian van den Broek
Peter Hansen said unto the world upon 01/07/2005 11:47: > Dan Sommers wrote: > >>Peter Hansen <[EMAIL PROTECTED]> wrote: >> >>>This problem is well suited to the abilities of genetic algorithms, >>>and this would probably be an excellent way to learn more about them, >>>even if you don't get the b

Re: calldll compiled for Python 2.4 for Windows

2005-07-01 Thread Do Re Mi chel La Si Do
Hi ! Use Ctypes Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Programmers Contest: Fit pictures on a page

2005-07-01 Thread Robert Kern
Brian van den Broek wrote: > Well, I found it ironic, but only when you add that the genetic > algorithm approach came up in the context of a "best fit" problem. > Survival of the fittest indeed :-) Optimization codes don't always succeed. What's the irony? -- Robert Kern [EMAIL PROTECTED] "

Re: Assigning to None

2005-07-01 Thread Michael Sparks
Mike Meyer wrote: > Peter Hansen <[EMAIL PROTECTED]> writes: >> Mike Meyer wrote: >>> Yes. I once grabbed an old program that did assignments to None. But >>> that's always been a bad idea. >> What was the use case!? > > Unpacking a tuple. Something like this: > > (foo, bar, None) = gen

Re: Favorite non-python language trick?

2005-07-01 Thread Shai
Joseph Garvin wrote: > > I'm curious -- what is everyone's favorite trick from a non-python > language? And -- why isn't it in Python? > 1. Lisp's "dynamically scoped" variables (Perl has them, and calls them "local", but as far as I've seen their use their is discouraged). These are global variab

Re: Favorite non-python language trick?

2005-07-01 Thread Jp Calderone
On Fri, 01 Jul 2005 15:02:10 -0500, Rocco Moretti <[EMAIL PROTECTED]> wrote: >Joseph Garvin wrote: > >> I'm curious -- what is everyone's favorite trick from a non-python >> language? And -- why isn't it in Python? > >I'm not aware of a language that allows it, but recently I've found >myself wanti

Re:

2005-07-01 Thread F. Petitjean
Le Fri, 01 Jul 2005 20:47:45 +0200, Andreas Kostyrka a écrit : about C++ templates > And they are a kind of "compile-time" late binding. You get the worst > from both worlds. All the complication of a static typing system, and at > the same time no safety. +1 QOTW -- http://mail.python.org/mailma

Re: Favorite non-python language trick?

2005-07-01 Thread Scott David Daniels
Rocco Moretti wrote: > Joseph Garvin wrote: > > I'm not aware of a language that allows it, but recently I've found > myself wanting the ability to transparently replace objects > I mainly look for it in the "object replaces self" form, but I guess you > could also have it for arbitrary objec

web programming with mod_python

2005-07-01 Thread Rodrigo Dominguez
Actually I'm using php4 for web programming, but I don't like it, I know that manny hosting servers supports mod_python, so I want to start programming in python for web applications with mod_python. My question is: is there some kind of framework that works with mod_python? I just want some classe

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Jp Calderone
On Fri, 01 Jul 2005 20:36:29 GMT, Ron Adam <[EMAIL PROTECTED]> wrote: >Tom Anderson wrote: > >> So, if you're a pythonista who loves map and lambda, and disagrees with >> Guido, what's your background? Functional or not? > >I find map too limiting, so won't miss it. I'm +0 on removing lambda >only

Re: Favorite non-python language trick?

2005-07-01 Thread Mike Meyer
"Shai" <[EMAIL PROTECTED]> writes: > Joseph Garvin wrote: >> >> I'm curious -- what is everyone's favorite trick from a non-python >> language? And -- why isn't it in Python? > > 1. Lisp's "dynamically scoped" variables (Perl has them, and calls them > "local", but as far as I've seen their use th

Re: Favorite non-python language trick?

2005-07-01 Thread Chris Rebert (cybercobra)
My personal favorite would be ruby's iterators and blocks. Instead of writing a bunch of repetitive list comprehensions or defining a bunch of utility functions, you just use the iterators supported by container objects. For instance, [f(x) for x in y] could be written in Ruby as y.collect |x| d

Python, mysql, floating point values question

2005-07-01 Thread Christopher Kang
I had a question about python and mysql, but I want to first thank those who taught me about the factory method, it was exactly what I needed. Anyway, I have a problem where I am pulling floating point values out of mysql and into python using the MYSQLdb module. However, the values seem to be al

Re: How to execute stored procedure?

2005-07-01 Thread [EMAIL PROTECTED]
db-api specifies a .callproc() method on a cursor object (http://www.python.org/peps/pep-0249.html), cx_Oracle implements it (http://starship.python.net/crew/atuining/cx_Oracle/html/cursorobj.html). for me it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Terry Hancock
On Friday 01 July 2005 03:36 pm, Ron Adam wrote: > I find map too limiting, so won't miss it. I'm +0 on removing lambda > only because I'm unsure that there's always a better alternative. Seems like some new idioms would have to be coined, like: def my_function(a1, a2): def _(a,b): return a

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Sean McIlroy
Tom Anderson wrote: > So, if you're a pythonista who loves map and lambda, and disagrees with > Guido, what's your background? Functional or not? glad you asked. personally i don't know lisp (or scheme), but now i've decided to learn it, because eventually it will no longer be possible in python

Re: Programmers Contest: Fit pictures on a page

2005-07-01 Thread Brian van den Broek
Robert Kern said unto the world upon 01/07/2005 17:24: > Brian van den Broek wrote: > > >>Well, I found it ironic, but only when you add that the genetic >>algorithm approach came up in the context of a "best fit" problem. >>Survival of the fittest indeed :-) > > > Optimization codes don't al

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread John Roth
"Tom Anderson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Comrades, > > During our current discussion of the fate of functional constructs in > python, someone brought up Guido's bull on the matter: > > http://www.artima.com/weblogs/viewpost.jsp?thread=98196 > > He says he's go

Re: Python, mysql, floating point values question

2005-07-01 Thread [EMAIL PROTECTED]
Christopher Kang wrote: > I had a question about python and mysql, but I want to first thank > those who taught me about the factory method, it was exactly what I > needed. > > Anyway, I have a problem where I am pulling floating point values out > of mysql and into python using the MYSQLdb modul

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-07-01 Thread Andrew Durdin
On 7/1/05, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-06-30, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote: > > Tom Anderson wrote: > > > >> How about carrier? > > > > Ends in an "a" (Australian ;) > > Right, but due to some wierd property requiring conservation of > consonants, when sp

custom Tkinter ListBox selectMode

2005-07-01 Thread Ron Provost
Hello, I've written a simple GUI which contains a listbox to hold some information. I've found that the click-selection schemes provided by Tkinter are insufficient for my needs. Essentiall I need to impletement a custom selectMode. As a first go, I've attempted to implement a click-on-click-

Re: Seeking IDE

2005-07-01 Thread Nick Mountford
Thanks a lot for all the suggestions. I´m ising IDLE and trying to get into eclipse. Cheers, Nick On 6/30/05, Nick Mountford <[EMAIL PROTECTED]> wrote: > Hi, > > Complete newb to Python and programming, looking for an open source > IDE to download. Any suggestions? > > Thanks, > > Nick > --

Re: I am a Java Programmer

2005-07-01 Thread Irmen de Jong
George Sakkis wrote: > "[EMAIL PROTECTED]" wrote: > > >>I am a java programmer and I want to learn Python Please help me. > > > Google Is Your Friend: > > http://www.razorvine.net/python/PythonForJavaProgrammers > http://www.ferg.org/projects/python_java_side-by-side.html > > George > The f

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Peter Hansen
Sean McIlroy wrote: > personally i don't know lisp (or scheme), but now i've > decided to learn it, because eventually it will no longer be possible > in python to pass functions as arguments or return them as values. the > education sig will have to change its motto to "computer programming > for

Re: Better console for Windows?

2005-07-01 Thread Dave Benjamin
Brett Hoerner wrote: > Is there a different shell I can use (other than cmd.com) to run Python > in, where I can full-screen the window (if I pleased), etc? As it is, > things that would run far off the right have to be word wrapped after > very few characters. I have a pretty exotic setup but I

Re: When someone from Britain speaks, Americans hear a "Britishaccent"...

2005-07-01 Thread Grant Edwards
On 2005-07-02, Andrew Durdin <[EMAIL PROTECTED]> wrote: > On 7/1/05, Grant Edwards <[EMAIL PROTECTED]> wrote: >> On 2005-06-30, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote: >> > Tom Anderson wrote: >> > >> >> How about carrier? >> > >> > Ends in an "a" (Australian ;) >> >> Right, but due to s

Re: Running Python interpreter in Emacs

2005-07-01 Thread John Machin
Rex Eastbourne wrote: > Yes! Thank you so much! (For some reason, by the way, I had to copy > python.exe to my c:/ directory, No, you did _not_ need to copy it there. You did _not_ need to copy it anywhere. Didn't copying an executable to your root directory [on any operating system] strike you

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Paul McGuire
I have never written a line of Lisp or Scheme, so it took me a while to grok "lambda" as a synonym for "expression to be evaluated later". I then thought it was similar to Smalltalk's functional closures, since you can define local arguments at the beginning of the block, and then write the body o

$6 into $1000ands this actually works!

2005-07-01 Thread Thomas
PAYPAL VERIFIES THAT THIS $6 INVESTMENT SCHEME IS 100% LEGAL AND IS A BIG HIT THIS YEAR SEE THEIR NOTE BELOW OR ASK THEM DIRECTLY... THIS SCHEME MIGHT TAKE 15-30 MINUTES AND JUST $6, BUT IT IS 100% WORTH IT TO MAKE THOUSANDS SO QUICKLY. THIS IS NOT ANOTHER SCAM THAT TAKES LOTS OF YOUR HARD EARNED M

Re: shelve in a ZipFile?

2005-07-01 Thread Terry Hancock
On Friday 01 July 2005 12:53 pm, Scott David Daniels wrote: > Terry Hancock wrote: > > I only just recently had a look at the shelve module > > That would be handy if, for example, I wanted to couple > > (and compress into the bargain) by putting my two > > shelf files into a single zip archive

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Sean McIlroy
Peter Hansen wrote: > Sean, what gave you the impression this would change? just inductive reasoning. i've been wrong before (like anyone who makes that claim), and i'm a former python enthusiast, so my judgement must be colored to some extent by bitterness. maybe they have solid reasons for scr

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Chris Smith
> "Devan" == Devan L <[EMAIL PROTECTED]> writes: Devan> None of them are really indispensible. Map and filter cab Devan> be replaced with list comprehensions. reduce is redundant Devan> except when multiplying a series; there's a sum function Devan> for a reason. Lambda looks c

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Erik Max Francis
Sean McIlroy wrote: > if that's the case then list > comprehensions and/or "first class functions" are likely to be the next > target. Slippery slope arguments are logical fallacies, you know. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 1

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Robert Kern
Chris Smith wrote: > My question is, why not move them into, say, a "functional" library, > so that legacy code can be handled via an import, and those heads > preferring to think that way can be satisfied, and those little corner > cases not handled by the newer, sweller syntaxes can still be mana

Re: Favorite non-python language trick?

2005-07-01 Thread Mike Meyer
[Lots of quoted text left in...] I started thinking about this, and realized that there was a way to do what you wanted, with no execution time overhead, and without providing ways to radically change the program behavior behind the scenes. Mike Meyer <[EMAIL PROTECTED]> writes: > "Shai" <[EMAIL

Re: Python, mysql, floating point values question

2005-07-01 Thread Terry Hancock
On Friday 01 July 2005 05:40 pm, Christopher Kang wrote: > Anyway, I have a problem where I am pulling floating point values out > of mysql and into python using the MYSQLdb module. > > However, the values seem to be altered a little when I store them in python. I'm not even going to start to exp

Re: Programmers Contest: Fit pictures on a page

2005-07-01 Thread Terry Hancock
On Friday 01 July 2005 06:25 pm, Brian van den Broek wrote: > All in all, I wish I'd not hit send in the first place. This is > perilously close to sending me into fits ;-) Well, I thought it was funny, anyway. Of course, not when you have to explain it. ;-) I guess you just have to have a stro

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Robert Kern
Sean McIlroy wrote: > Peter Hansen wrote: > > >>Sean, what gave you the impression this would change? > > just inductive reasoning. i've been wrong before (like anyone who makes > that claim), and i'm a former python enthusiast, so my judgement must > be colored to some extent by bitterness. ma

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Mike Meyer
"Sean McIlroy" <[EMAIL PROTECTED]> writes: > Peter Hansen wrote: > >> Sean, what gave you the impression this would change? > if that's the case then list comprehensions and/or "first class > functions" are likely to be the next target. The existence of list comprehensions are the reason that th

Re: Favorite non-python language trick?

2005-07-01 Thread BJörn Lindqvist
I like C++ templates so that you can ensure that a list only contain items of one type. I also like the JMP instruction in x86 assembler, you could do some nasty tricks with that. -- mvh Björn -- http://mail.python.org/mailman/listinfo/python-list

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Ron Adam
Terry Hancock wrote: > On Friday 01 July 2005 03:36 pm, Ron Adam wrote: > >>I find map too limiting, so won't miss it. I'm +0 on removing lambda >>only because I'm unsure that there's always a better alternative. > > > Seems like some new idioms would have to be coined, like: > > def my_func

Re: Favorite non-python language trick?

2005-07-01 Thread Terry Reedy
"Devan L" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > With the exception of reduce(lambda x,y:x*y, sequence), reduce can be > replaced with sum, and Guido wants to add a product function. The update function is not at all limited to sums and products, but can be any callable w

Bad Math

2005-07-01 Thread Patrick Rutkowski
I started reading a python book today, one example was: >>> 4 / (2.0 + 3) 0.8 My input/output was: >>> 4 (2.0 + 3) 0.80004 Something smells fishy here... whats up? --python 2.4.1 -- http://mail.python.org/mailman/listinfo/python-list

Re: Better console for Windows?

2005-07-01 Thread Bengt Richter
On Tue, 28 Jun 2005 14:44:21 +0100, Richie Hindle <[EMAIL PROTECTED]> wrote: > >[Christos, on widening the Windows Command Prompt] >> Hm... right-click the cmd.exe window's title bar (or click on the >> top-left icon, or press Alt-Space), go to Properties, Layout tab, Window >> Size, Width. > >Jus

Re: Bad Math

2005-07-01 Thread Robert Kern
Patrick Rutkowski wrote: > I started reading a python book today, one example was: > 4 / (2.0 + 3) > > 0.8 Must be an old book. > My input/output was: > 4 (2.0 + 3) > > 0.80004 This is correct. > Something smells fishy here... whats up? > > --python 2.4.1 http://docs.p

Re: $6 into $1000ands this actually works!

2005-07-01 Thread Patrick Maupin
Thomas wrote: > TURN $6 INTO $15,000 IN ONLY 30 DAYS...HERES HOW! > $ REMEMBER, IT IS 100% LEGAL! DON'T PASS THIS UP! and I thought this was about some new currency/decimal module implementation which remembers units and does the conversion correctly... -- http://mail.python.org/mailman/li

Re: Bad Math

2005-07-01 Thread Brian van den Broek
Patrick Rutkowski said unto the world upon 01/07/2005 23:56: > I started reading a python book today, one example was: > > 4 / (2.0 + 3) > > 0.8 > > My input/output was: > > 4 (2.0 + 3) > > 0.80004 > > Something smells fishy here... whats up? > > --python 2.4.1

Re: Python, mysql, floating point values question

2005-07-01 Thread John Machin
Terry Hancock wrote: > On Friday 01 July 2005 05:40 pm, Christopher Kang wrote: > >>Anyway, I have a problem where I am pulling floating point values out >>of mysql and into python using the MYSQLdb module. >> >>However, the values seem to be altered a little when I store them in python. > > > I

Re: How to find Windows "Application data" directory??

2005-07-01 Thread Bengt Richter
On 28 Jun 2005 21:09:12 -0700, Paul Rubin wrote: >"Rune Strand" <[EMAIL PROTECTED]> writes: >> You have the environment variable APPDATA. You can access it with >> os.environ(). > >Thanks!! Wow, I'd been hacking away at much messier approaches >than that. It's actu

Re: map/filter/reduce/lambda opinions and background unscientific mini-survey

2005-07-01 Thread Donn Cave
Quoth Tom Anderson <[EMAIL PROTECTED]>: ... | I disagree strongly with Guido's proposals, and i am not an ex-Lisp, | -Scheme or -any-other-functional-language programmer; my only other real | language is Java. I wonder if i'm an outlier. | | So, if you're a pythonista who loves map and lambda, an

Re: Seeking IDE

2005-07-01 Thread [EMAIL PROTECTED]
If you are looking for a small and simple text editor that moonlights as an IDE, my suggestion would be SciTE(http://scintilla.org/SciTE.html). It has reasonable syntax highlighting and can run Python scripts if you press F5. -- http://mail.python.org/mailman/listinfo/python-list

Another newbie question from Nathan.

2005-07-01 Thread Nathan Pinno
Hi all. How do I make the computer generate 4 random numbers for the guess? I want to know because I'm writing a computer program in Python like the game MasterMind. Thanks. -- Nathan Pinno http://www.npinnowebsite.ca/ -- -

Re: Another newbie question from Nathan.

2005-07-01 Thread Brian van den Broek
Nathan Pinno said unto the world upon 02/07/2005 02:25: > > Hi all. > > How do I make the computer generate 4 random numbers for the guess? I want > to know because I'm writing a computer program in Python like the game > MasterMind. > > Thanks. > > -- > Nathan Pinno > http://www.n

<    1   2