Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
Tomasz Zielonka [EMAIL PROTECTED] wrote: Alex Martelli wrote: Having to give functions a name places no ceiling on expressiveness, any more than, say, having to give _macros_ a name. And what about having to give numbers a name? Excellent style, in most cases; I believe most sensible

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
Tomasz Zielonka [EMAIL PROTECTED] wrote: ... higher level languages. There are useful programming techniques, like monadic programming, that are infeasible without anonymous functions. Anonymous functions really add some power to the language. Can you give me one example that would be

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Tomasz Zielonka
Alex Martelli wrote: Tomasz Zielonka [EMAIL PROTECTED] wrote: Alex Martelli wrote: Having to give functions a name places no ceiling on expressiveness, any more than, say, having to give _macros_ a name. And what about having to give numbers a name? Excellent style, in most cases; I

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Serge Orlov
Ken Tilton wrote: It is vastly more disappointing that an alleged tech genius would sniff at the chance to take undeserved credit for PyCells, something probably better than a similar project on which Adobe (your superiors at software, right?) has bet the ranch. This is the Grail, dude,

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Bill Atkins
Serge Orlov [EMAIL PROTECTED] writes: Ken Tilton wrote: It is vastly more disappointing that an alleged tech genius would sniff at the chance to take undeserved credit for PyCells, something probably better than a similar project on which Adobe (your superiors at software, right?) has bet

python rounding problem.

2006-05-07 Thread chun ping wang
Hey i have a stupid question. How do i get python to print the result in only three decimal place... Example round (2.9954254, 3) 2.9951 but i want to get rid of all trailing 0's..how would i do that? _ Express

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Kay Schluehr
Tomasz Zielonka wrote: On the other hand, what do you get by allowing ( as an indentifier? Significant whitespace is a good thing, but the way it is designed in Python it has some costs. Can't you simply acknowledge that? One can admit this but what is it worth or how should those costs be

Re: python rounding problem.

2006-05-07 Thread Erik Max Francis
chun ping wang wrote: Hey i have a stupid question. How do i get python to print the result in only three decimal place... Example round (2.9954254, 3) 2.9951 but i want to get rid of all trailing 0's..how would i do that? Floating point arithmetic is inherently

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread brian
Bill Atkins wrote: Does Python have any support for closures? If so, ignore this point. But if not, what about examples like this: (defun make-window (window observer) ;; initialization code here (add-handler window 'close (lambda (event)

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Serge Orlov
Bill Atkins wrote: Serge Orlov [EMAIL PROTECTED] writes: Ken Tilton wrote: It is vastly more disappointing that an alleged tech genius would sniff at the chance to take undeserved credit for PyCells, something probably better than a similar project on which Adobe (your superiors at

Integrate docs of site-packages with Python doc index?

2006-05-07 Thread Christoph Zwerschke
I just thought it would be nice to have a standardized place to put the accompanying documentation for Python site packages, and something like a hook to register documentation so that all installed site packages can install links to their documentation in the Python Documentation Index. Are

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread brian
Bill Atkins wrote: Buh? The project doesn't have to be late for Brooks's law to hold; adding programmers, so goes Brooks reasoning, will always increase the time required to complete the project because of various communication issues. 1. This is not what Brooks says. Brooks was talking

Re: GladeGen and initializing widgets at startup

2006-05-07 Thread Aengys
Thank you for your reply! I finally managed to do what I wanted. Maybe a little side-remark here. In the article you have said that all changes to the init-method are lost once you regenerate the file. I have tried it, and indeed all my changes were lost (which I had backed up before). So I've

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread I V
On Sat, 06 May 2006 23:05:59 -0700, Alex Martelli wrote: Tomasz Zielonka [EMAIL PROTECTED] wrote: ... higher level languages. There are useful programming techniques, like monadic programming, that are infeasible without anonymous functions. Anonymous functions really add some power to the

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Bill Atkins
Serge Orlov [EMAIL PROTECTED] writes: Bill Atkins wrote: Serge Orlov [EMAIL PROTECTED] writes: Ken Tilton wrote: It is vastly more disappointing that an alleged tech genius would sniff at the chance to take undeserved credit for PyCells, something probably better than a similar project

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Frank Buss
Alex Martelli wrote: I cannot conceive of one. Wherever within a statement I could write the expression lambda args: body I can *ALWAYS* obtain the identical effect by picking an otherwise locally unused identifier X, writing the statement def X(args): body and using, as the

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Bill Atkins
[EMAIL PROTECTED] writes: Bill Atkins wrote: Buh? The project doesn't have to be late for Brooks's law to hold; adding programmers, so goes Brooks reasoning, will always increase the time required to complete the project because of various communication issues. 1. This is not what Brooks

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Dr.Ruud
Paul Rubin schreef: a cryptographic PRNG seeded with good entropy is supposed to be computationally indistinguishable from physical randomness Doesn't your good entropy include physical randomness? -- Affijn, Ruud Gewoon is een tijger. --

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Chris Uppal
Bill Atkins wrote: But why should I have to worry about any of this? Why can't I do: (with-indentation (pdf (+ (indentation pdf) 4)) (out-header) (out-facts)) and then within, say out-facts: (with-indentation (pdf (+ (indentation pdf) 4)) (write pdf some text)) More

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Carl Friedrich Bolz
Bill Atkins wrote: [snip] Unfortunately, it's *nothing* like a full PyCell implementation. I explained what Cells is above. It is not merely a spreadsheet - it is an extension that allows the programmer to specify how the value of some slot (Lisp lingo for member variable) can be computed.

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Patrick May
[EMAIL PROTECTED] (Alex Martelli) writes: In my opinion (and that of several others), the best way for Python to grow in this regard would be to _lose_ lambda altogether, since named functions are preferable Why? I find the ability to create unnamed functions on the fly to be a

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread brian
Bill Atkins wrote: [EMAIL PROTECTED] writes: Bill Atkins wrote: Buh? The project doesn't have to be late for Brooks's law to hold; adding programmers, so goes Brooks reasoning, will always increase the time required to complete the project because of various communication issues. 1. This

md5 from python different then md5 from command line

2006-05-07 Thread [EMAIL PROTECTED]
Hi I noticed that the md5 computed with md5 module from python is different then the md5 sum computed with md5sum utility (on slackware and gentoo). i.e. $echo marius|md5sum 0f0f60ac801a9eec2163083a22307deb - test = md5.new(marius) print test.hexdigest() 242aa1a97769109065e3b4df359bcfc9 Any

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread brian
Patrick May wrote: [EMAIL PROTECTED] (Alex Martelli) writes: In my opinion (and that of several others), the best way for Python to grow in this regard would be to _lose_ lambda altogether, since named functions are preferable Why? I find the ability to create unnamed functions on the

algorithmic mathematical art

2006-05-07 Thread Xah Lee
i've long time been interested in algorithmic mathematical art. That is, mathematical or algorithmic visual art works that are generated by computer such that the program's source code reflects the algorithmic essence of the visual quality in the art work. (for detail, see Algorithmic Mathematical

Re: md5 from python different then md5 from command line

2006-05-07 Thread Just
In article [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I noticed that the md5 computed with md5 module from python is different then the md5 sum computed with md5sum utility (on slackware and gentoo). i.e. $echo marius|md5sum 0f0f60ac801a9eec2163083a22307deb - test

Re: md5 from python different then md5 from command line

2006-05-07 Thread Dejan Rodiger
[EMAIL PROTECTED] said the following on 07.05.2006 12:07: Hi I noticed that the md5 computed with md5 module from python is different then the md5 sum computed with md5sum utility (on slackware and gentoo). i.e. $echo marius|md5sum 0f0f60ac801a9eec2163083a22307deb - test =

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Bill Atkins
Chris Uppal [EMAIL PROTECTED] writes: Bill Atkins wrote: But why should I have to worry about any of this? Why can't I do: (with-indentation (pdf (+ (indentation pdf) 4)) (out-header) (out-facts)) and then within, say out-facts: (with-indentation (pdf (+ (indentation

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Bill Atkins
[EMAIL PROTECTED] writes: Bill Atkins wrote: [EMAIL PROTECTED] writes: Bill Atkins wrote: Buh? The project doesn't have to be late for Brooks's law to hold; adding programmers, so goes Brooks reasoning, will always increase the time required to complete the project because of various

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Bill Atkins
Bill Atkins [EMAIL PROTECTED] writes: There are still more! _On Lisp_ has a lot of interesting ones, like an embedded Prolog interpreter and compiler: (-- (father billsr billjr)) (?- (father billsr ?)) ? = billjr Actually, these might not be implemented as macros. -- This is a

Re: md5 from python different then md5 from command line

2006-05-07 Thread Marius Ursache
echo adds a newline: import md5 test = md5.new(marius\n) print test.hexdigest() 0f0f60ac801a9eec2163083a22307deb Just Thanks, that was it ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Thomas F. Burdick
Ken Tilton [EMAIL PROTECTED] writes: As for: At a syntax-sugar level, for example, Lisp's choice to use parentheses as delimiter means it's undesirable, even unfeasible, to use the single character '(' as an ordinary identifier in a future release of the language. (defun |(|

Re: Newbie question on code vetting

2006-05-07 Thread Anders J. Munch
[EMAIL PROTECTED] wrote: As it is now, one is pretty much left to rummage around on project web sites trying to get a gut feel for what is going on. Asking the higher-ups at work to reach technology management decisions based on my gut feel is an uphill climb. So what you need is a document

Re: algorithmic mathematical art

2006-05-07 Thread Frank Buss
Xah Lee wrote: The one most prominent mention of it is in chapter 2 of the book Structure and Interpretation of Computer Programs by Hal Abelson et al. Thanks for the interesting book tip, it is available online: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-15.html#%_sec_2.2.4

Re: ANN: eric3 3.9.0 released

2006-05-07 Thread J. A. Gaeta Mendes
Petr Jakes wrote: I think you can get the answer on http://www.die-offenbachs.de/detlev/eric3-mailinglist.html rather then here. HTH Petr Jakes Thanks Petr, I've got help there. To those interested, the problem was PyKDE was missing. Best regards, -- jagm --

Re: pygresql - bytea

2006-05-07 Thread Christoph Zwerschke
Jan Danielsson wrote: I'm trying to use pygresql to insert binary data (type: bytea) into a column (using postgresql, obviously). ... Does _anyone_ have a working example? A simple insertion, and a simple select is all I'm looking for. You should better ask such questions on the

Re: GladeGen and initializing widgets at startup

2006-05-07 Thread David Reed
On May 7, 2006, at 4:24 AM, Aengys wrote: Thank you for your reply! I finally managed to do what I wanted. Maybe a little side-remark here. In the article you have said that all changes to the init-method are lost once you regenerate the file. I have tried it, and indeed all my changes

Re: python rounding problem.

2006-05-07 Thread gene tani
Erik Max Francis wrote: chun ping wang wrote: Hey i have a stupid question. How do i get python to print the result in only three decimal place... Example round (2.9954254, 3) 2.9951 but i want to get rid of all trailing 0's..how would i do that? Floating

Re: How to get client's IP address in the threaded case of SimpleXMLRPCServer?

2006-05-07 Thread Chris Lambacher
On Fri, May 05, 2006 at 05:02:57PM -0400, Eirikur Hallgrimsson wrote: Okay, I've banged my head against this for about three days on and off. The client's IP is passed to my handler in the non-threaded case. It's not in the threaded case, which is actually rather different with a couple of

Re: How to doctest if __name__ already used?

2006-05-07 Thread Chris Lambacher
On Fri, May 05, 2006 at 10:33:48PM +, Leo Breebaart wrote: Trigger doctest.testmod() via a --test command-line option, is what I'm thinking. But is that really the best way? That is what I would have suggested. -Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Ken Tilton
Serge Orlov wrote: Ken Tilton wrote: It is vastly more disappointing that an alleged tech genius would sniff at the chance to take undeserved credit for PyCells, something probably better than a similar project on which Adobe (your superiors at software, right?) has bet the ranch. This is the

Why I get wrong filetime values with win32 api (FindFilesW) ?

2006-05-07 Thread Dara Durum
Hi !I need to get filelists from many HDD-s with more props. of files.I used FindFilesW to get these informations.But I have a problems with it.When I used Find_Data tuple, and it's atime,ctime,mtime props, I get wrong result. I have hungarian Windows (XP), so little time diff. I have.These method

Re: Job opportunity in France

2006-05-07 Thread Thorsten Kampe
* Butternut squash (2006-05-06 16:55 +) Rony Steelandt wrote: We have a vacancy for a python programmer for a 6 months assignement. If interested, please visit www.bucodi.com And don't worry we speak english :) seriously, a job opportunity in France?? I heard that the unemployment

Re: How to doctest if __name__ already used?

2006-05-07 Thread Jay Parlar
On May 5, 2006, at 10:33 PM, Leo Breebaart wrote: I have a simple question (I hope), but one I'd love to get some feedback on in case I am missing something obvious: If I have a Python script that is executable, and therefore already uses '''if __name__ == __main__''' to call a function of

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Ken Tilton
Serge Orlov wrote: Bill Atkins wrote: Serge Orlov [EMAIL PROTECTED] writes: Ken Tilton wrote: It is vastly more disappointing that an alleged tech genius would sniff at the chance to take undeserved credit for PyCells, something probably better than a similar project on which Adobe (your

Re: MQSeries based file transfers using the pymqi module

2006-05-07 Thread Dariusz Suchojad
Andrew Robert wrote: Hi everyone, Hello, Has anyone developed a pymqi module based file transfer method for use with WebSphere MQSeries v5.3? If so, would it be possible to point me towards examples of how this was done? I'm not sure I understand your question. Webshpere MQ expects

Re: Splice two lists

2006-05-07 Thread [EMAIL PROTECTED]
When used in a function call (as opposed to a function definition), * is the unpacking operator. Basically, it flattens an iterable into arguments. The docs mention it... Cool, looks like I didn't read carefully enough. Thanks again. -- http://mail.python.org/mailman/listinfo/python-list

Re: python rounding problem.

2006-05-07 Thread Gary Wessle
Erik Max Francis [EMAIL PROTECTED] writes: chun ping wang wrote: Hey i have a stupid question. How do i get python to print the result in only three decimal place... Example round (2.9954254, 3) 2.9951 but i want to get rid of all trailing 0's..how would i do

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Ken Tilton
Thomas F. Burdick wrote: Ken Tilton [EMAIL PROTECTED] writes: As for: At a syntax-sugar level, for example, Lisp's choice to use parentheses as delimiter means it's undesirable, even unfeasible, to use the single character '(' as an ordinary identifier in a future release of the

printing list

2006-05-07 Thread compboy
How do you print elements of the list in one line? alist = [1, 2, 5, 10, 15] so it will be like this: 1, 2, 5, 10, 15 because if I use this code for i in alist: print i the result would be like this 1 2 5 10 15 Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: NumTut view of greece

2006-05-07 Thread Gary Herron
Gary Wessle wrote: Hi not sure if this would be the right place to ask this question! using the shell prompt :~$ python Python 2.3.5 (#2, Mar 6 2006, 10:12:24) [GCC 4.0.3 20060304 (prerelease) (Debian 4.0.2-10)] on linux2 Type help, copyright, credits or license for more information.

Re: printing list

2006-05-07 Thread Gary Herron
compboy wrote: How do you print elements of the list in one line? alist = [1, 2, 5, 10, 15] so it will be like this: 1, 2, 5, 10, 15 because if I use this code for i in alist: print i the result would be like this 1 2 5 10 15 Thanks. Well, first, if you just print alist you'll get

Re: printing list

2006-05-07 Thread Tim Chase
compboy wrote: How do you print elements of the list in one line? alist = [1, 2, 5, 10, 15] so it will be like this: 1, 2, 5, 10, 15 print ', '.join(alist) 1, 2, 5, 10, 15 -tkc -- http://mail.python.org/mailman/listinfo/python-list

Re: printing list

2006-05-07 Thread Raymond L. Buvel
compboy wrote: How do you print elements of the list in one line? alist = [1, 2, 5, 10, 15] so it will be like this: 1, 2, 5, 10, 15 because if I use this code for i in alist: print i the result would be like this 1 2 5 10 15 Thanks. There are a number of ways to

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Ken Tilton
Ken Tilton wrote: Serge Orlov wrote: Ken Tilton wrote: It is vastly more disappointing that an alleged tech genius would sniff at the chance to take undeserved credit for PyCells, something probably better than a similar project on which Adobe (your superiors at software, right?)

Re: printing list

2006-05-07 Thread Tim Williams
On 7 May 2006 09:15:10 -0700, compboy [EMAIL PROTECTED] wrote: How do you print elements of the list in one line? alist = [1, 2, 5, 10, 15] so it will be like this: 1, 2, 5, 10, 15 because if I use this code for i in alist: print i the result would be like this 1 2 5 10 15

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alexander Schmolck
[trimmed groups] Ken Tilton [EMAIL PROTECTED] writes: yes, but do not feel bad, everyone gets confused by the /analogy/ to spreadsheets into thinking Cells /is/ a spreadsheet. In fact, for a brief period I swore off the analogy because it was so invariably misunderstood. Even Graham

Numerical Python Tutorial errors

2006-05-07 Thread Gary Wessle
Hi is the Numerical Python tutorial maintained? http://www.pfdubois.com/numpy/html2/numpy.html seams to have some errors and no email to mail them to when found. if interested, read about the errors below (1)

Passing options around your program

2006-05-07 Thread Leo Breebaart
I have another question where I am not so much looking for a solution but rather hoping to get some feedback on *which* solutions people here consider good Pythonic ways to approach a issue. The situation is this: I am writing fairly large console scripts in Python. They have quite a few

Re: md5 from python different then md5 from command line

2006-05-07 Thread Paul Rubin
Marius Ursache [EMAIL PROTECTED] writes: import md5 test = md5.new(marius\n) print test.hexdigest() 0f0f60ac801a9eec2163083a22307deb Thanks, that was it ;) Also, the -n option suppresses the newline from echo: $ echo -n marius | md5sum 242aa1a97769109065e3b4df359bcfc9

Re: algorithmic mathematical art

2006-05-07 Thread verec
On 2006-05-07 12:31:47 +0100, Frank Buss [EMAIL PROTECTED] said: anyway, today i ran into this page by Frank Buß http://www.frank-buss.de/lisp/functional.html which used the idea in the book to render a traditional Escher's tiling piece. I should note that I've used the original paper from

Re: md5 from python different then md5 from command line

2006-05-07 Thread John Salerno
[EMAIL PROTECTED] wrote: Hi I noticed that the md5 computed with md5 module from python is different then the md5 sum computed with md5sum utility (on slackware and gentoo). i.e. $echo marius|md5sum 0f0f60ac801a9eec2163083a22307deb - test = md5.new(marius) print test.hexdigest()

Python CHM Doc Contains Broken Links on Linux in xCHM.

2006-05-07 Thread vbgunz
Hello! this is the main error: http://img406.imageshack.us/img406/5218/screenshotxchmerror1ae.png navigation link images broken here: http://img406.imageshack.us/img406/2822/screenshotxchmv12python24docum.png when I first open up the docs, the main page and Global Module Index links in the tree

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Bill Atkins
Alexander Schmolck [EMAIL PROTECTED] writes: [trimmed groups] Ken Tilton [EMAIL PROTECTED] writes: yes, but do not feel bad, everyone gets confused by the /analogy/ to spreadsheets into thinking Cells /is/ a spreadsheet. In fact, for a brief period I swore off the analogy because it was so

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Bill Atkins
Bill Atkins [EMAIL PROTECTED] writes: Alexander Schmolck [EMAIL PROTECTED] writes: [trimmed groups] Ken Tilton [EMAIL PROTECTED] writes: yes, but do not feel bad, everyone gets confused by the /analogy/ to spreadsheets into thinking Cells /is/ a spreadsheet. In fact, for a brief period I

Re: algorithmic mathematical art

2006-05-07 Thread Alex Hunsley
Xah Lee wrote: i've long time been interested in algorithmic mathematical art. That is, mathematical or algorithmic visual art works that are generated by computer such that the program's source code reflects the algorithmic essence of the visual quality in the art work. (for detail, see

Re: md5 from python different then md5 from command line

2006-05-07 Thread Paul Rubin
John Salerno [EMAIL PROTECTED] writes: Just a quick md5-related follow-up question: I was experimenting with it and making md5 sums for strings, but how do you use the md5 module to create a sum for an actual file, such as an .exe file? m = md5.new() f = file('foo.exe', 'b') # open in binary

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
[EMAIL PROTECTED] wrote: ... Being able to keep pass around state with functions is useful. I agree and Python supports this. What is interesting is how counter-intuitive many programmers find this. For example, one of my Funny: I have taught/mentored large number of people in Python,

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
[EMAIL PROTECTED] wrote: ... 2. There has to be a mechanism where an organization can add developers - even if it is only for new projects. Python advocates Obviously. It's good that you agree. I think that the ability to add new productive developers to a

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
Carl Friedrich Bolz [EMAIL PROTECTED] wrote: ... an extension that allows the programmer to specify how the value of some slot (Lisp lingo for member variable) can be computed. It frees the programmer from having to recompute slot values since Cells ... I have not looked at Cells at

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
Tomasz Zielonka [EMAIL PROTECTED] wrote: Alex Martelli wrote: Tomasz Zielonka [EMAIL PROTECTED] wrote: Alex Martelli wrote: Having to give functions a name places no ceiling on expressiveness, any more than, say, having to give _macros_ a name. And what about having to give

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
I V [EMAIL PROTECTED] wrote: ... higher level languages. There are useful programming techniques, like monadic programming, that are infeasible without anonymous functions. Anonymous functions really add some power to the language. Can you give me one example that would be feasible

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
Frank Buss [EMAIL PROTECTED] wrote: Alex Martelli wrote: I cannot conceive of one. Wherever within a statement I could write the expression lambda args: body I can *ALWAYS* obtain the identical effect by picking an otherwise locally unused identifier X, writing the statement

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
[EMAIL PROTECTED] wrote: Patrick May wrote: [EMAIL PROTECTED] (Alex Martelli) writes: In my opinion (and that of several others), the best way for Python to grow in this regard would be to _lose_ lambda altogether, since named functions are preferable Why? I find the ability to

Re: algorithmic mathematical art

2006-05-07 Thread Alex Hunsley
Xah Lee wrote: i've long time been interested in algorithmic mathematical art. That is, mathematical or algorithmic visual art works that are generated by computer such that the program's source code reflects the algorithmic essence of the visual quality in the art work. (for detail, see

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: I do hate it that [ x for x in container if predicate(x) ] is an exact synonym of the more legible list( x for x in container if predicate(x) ) Heh, I hate it that it's NOT an exact synonym (the listcomp leaves 'x' polluting the namespace and

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Carl Friedrich Bolz
Bill Atkins wrote: [snip] Here's how one of the cells examples might look in corrupted Python (this is definitely not executable): class FallingRock: def __init__(self, pos): define_slot( 'velocity', lambda: self.accel * self.elapsed ) define_slot( 'pos', lambda: self.accel *

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Frank Buss
Alex Martelli wrote: Sorry, but I just don't see what lambda is buying you here. Taking just one simple example from the first page you quote, you have: (defun blank () a blank picture (lambda (a b c) (declare (ignore a b c)) '())) You are right, for this example it is not

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
Paul Rubin http://[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] (Alex Martelli) writes: I do hate it that [ x for x in container if predicate(x) ] is an exact synonym of the more legible list( x for x in container if predicate(x) ) Heh, I hate it that it's NOT an exact synonym

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alex Martelli
Frank Buss [EMAIL PROTECTED] wrote: Alex Martelli wrote: Sorry, but I just don't see what lambda is buying you here. Taking just one simple example from the first page you quote, you have: (defun blank () a blank picture (lambda (a b c) (declare (ignore a b c))

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread olsongt
Alex Martelli wrote: Steve R. Hastings [EMAIL PROTECTED] wrote: ... But the key in the whole thread is simply that indentation will not scale. Nor will Python. This is a curious statement, given that Python is famous for scaling well. I think ridiculous is a better

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Frank Buss
Alex Martelli wrote: Not sure what the key means here, but omitting that def black_white(function, limit): def result(x,y): if function(x, y) limit: return 1.0 else: return 0.0 return result key is something like keyword arguments in Python. And looks like you

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Patrick May
[EMAIL PROTECTED] (Alex Martelli) writes: In my opinion (and that of several others), the best way for Python to grow in this regard would be to _lose_ lambda altogether, since named functions are preferable Why? I find the ability to create unnamed functions on the fly to be a

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Bill Atkins
[EMAIL PROTECTED] writes: Alex Martelli wrote: Steve R. Hastings [EMAIL PROTECTED] wrote: ... But the key in the whole thread is simply that indentation will not scale. Nor will Python. This is a curious statement, given that Python is famous for scaling well. I think ridiculous

Re: Numerical Python Tutorial errors

2006-05-07 Thread Robert Kern
Gary Wessle wrote: Hi is the Numerical Python tutorial maintained? http://www.pfdubois.com/numpy/html2/numpy.html seams to have some errors and no email to mail them to when found. No, it is not since Numeric itself is no longer maintained. The successor to Numeric is numpy and is being

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Alexander Schmolck
Bill Atkins [EMAIL PROTECTED] writes: Here's how one of the cells examples might look in corrupted Python (this is definitely not executable): class FallingRock: def __init__(self, pos): define_slot( 'velocity', lambda: self.accel * self.elapsed ) define_slot( 'pos',

Re: (non)compositionality

2006-05-07 Thread JShrager
There are *NO* semantic advantages for named vs unnamed functions in Python. I feel that this conversation has glanced off the point. Let me try a new approach: There is the Pythonic way (whatever that is), and then The Lisp Way. I don't know what the former is, but it has something to do with

Re: Passing options around your program

2006-05-07 Thread [EMAIL PROTECTED]
When I have done this, I've used the last option -- creating a config module which can be imported wherever the configuration info is needed. (This module also handles any config files and/or Windows registry keys needed.) Using a Borg is a nice idea... but that ConfigBorg is probably going to

Re: A critic of Guido's blog on Python's lambda

2006-05-07 Thread Aaron Denney
[Followup-To: header set to comp.lang.functional.] On 2006-05-07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: - it fits most programmers brains i.e. it is similar enough to languages that most programmers have experience with and the differences are usually perceived to

the tostring and XML methods in ElementTree

2006-05-07 Thread mirandacascade
O/S: Windows XP Home Vsn of Python: 2.4 Copy/paste of interactive window is immediately below; the text/questions toward the bottom of this post will refer to the content of the copy/paste from elementtree import ElementTree beforeRoot = ElementTree.Element('beforeRoot') beforeCtag =

Re: Passing options around your program

2006-05-07 Thread alisonken1
Leo Breebaart wrote: I have another question where I am not so much looking for a solution but rather hoping to get some feedback on *which* solutions people here consider good Pythonic ways to approach a issue. The situation is this: I am writing fairly large console scripts in Python.

released: RPyC 2.55

2006-05-07 Thread gangesmaster
Remote Python Call (RPyC) - transparent and symmetrical python RPC and distributed computing library download and info: http://rpyc.wikispaces.com full changelog: http://rpyc.wikispaces.com/changelog release notes: http://rpyc.wikispaces.com/release+notes major changes: * added isinstance and

Re: the tostring and XML methods in ElementTree

2006-05-07 Thread Serge Orlov
[EMAIL PROTECTED] wrote: Question 1: assuming the following: a) beforeCtag.text gets assigned a value of 'I\x92m confused' b) afterRoot is built using the XML() method where the input to the XML() method is the results of a tostring() method from beforeRoot Are there any settings/arguments

Re: printing list

2006-05-07 Thread Mel Wilson
Tim Chase wrote: compboy wrote: How do you print elements of the list in one line? alist = [1, 2, 5, 10, 15] so it will be like this: 1, 2, 5, 10, 15 print ', '.join(alist) 1, 2, 5, 10, 15 ??? Python 2.4.2 (#1, Jan 23 2006, 21:24:54) [GCC 3.3.4] on linux2 Type help, copyright,

Re: the tostring and XML methods in ElementTree

2006-05-07 Thread Serge Orlov
[EMAIL PROTECTED] wrote: O/S: Windows XP Home Vsn of Python: 2.4 [snip fighting with unicode character U+2019 (RIGHT SINGLE QUOTATION MARK) ] I don't know what console you use but if it is IDLE you'll get confused even more because it is buggy and improperly handles that character: print

why _import__ only works from interactive interpreter?

2006-05-07 Thread [EMAIL PROTECTED]
I don't know what I'm doing wrong, but the result is that _import_ only works from a python shell, but not when I call a python script. $ cat test.py mod = __import__(/home/me/tests/test_imp) Called from a script it does not work: $ python /home/me/test.py Traceback (most recent call last):

Re: printing list

2006-05-07 Thread Dan Sommers
On Sun, 07 May 2006 18:16:22 -0400, Mel Wilson [EMAIL PROTECTED] wrote: Tim Chase wrote: compboy wrote: How do you print elements of the list in one line? alist = [1, 2, 5, 10, 15] so it will be like this: 1, 2, 5, 10, 15 print ', '.join(alist) 1, 2, 5, 10, 15 ??? Python

Re: Swaying A Coder Away From Python

2006-05-07 Thread BJörn Lindqvist
On 5/4/06, Tim Williams [EMAIL PROTECTED] wrote: (and why do you seem to think that this matters, btw ?) I actually think it is complete twaddle, for the same reasons as you. I think this article has something to do with this article: http://www.paulgraham.com/submarine.html Maybe or

Re: md5 from python different then md5 from command line

2006-05-07 Thread John Salerno
Paul Rubin wrote: John Salerno [EMAIL PROTECTED] writes: Just a quick md5-related follow-up question: I was experimenting with it and making md5 sums for strings, but how do you use the md5 module to create a sum for an actual file, such as an .exe file? m = md5.new() f = file('foo.exe',

Re: md5 from python different then md5 from command line

2006-05-07 Thread Paul Rubin
John Salerno [EMAIL PROTECTED] writes: Any reason you can't just read the whole file at once and update m? Yes, you could say print md5.new(file('foo.exe').read()).hexdigest() but that means reading the whole file into memory at once. If the file is very large, that could thrash or fail.

  1   2   >