Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Steven
On Fri, 2 May 2008 19:03:55 -0400 "Terry Reedy" <[EMAIL PROTECTED]> wrote: > Some people write > somename = lambda args: expression > instead of the more obvious (to most people) and, dare I say, standard > def somename(args): return expression [...] > There are currently uses of named lam

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Samuele Pedroni
Terry Reedy wrote: Some people write somename = lambda args: expression instead of the more obvious (to most people) and, dare I say, standard def somename(args): return expression The difference in the result (the only one I know of) is that the code and function objects get the generi

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Nick Coghlan
Alex Martelli wrote: On Fri, May 2, 2008 at 4:11 PM, Jesse Noller <[EMAIL PROTECTED]> wrote: +1 from me +2 from me -- of all abuses of lambdas, this one's the worst. What Alex said :) Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --

Re: [Python-Dev] [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

2008-05-03 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: Fred> If user-local package installs went to ~/ by default ... with a Fred> way to set an alternate "prefix" instead of ~/ using a distutils Fred> configuration setting, I'd be happy enough. +1 from me. But then we clutter up people's (read *my*) home direc

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Robert Brewer
Samuele Pedroni wrote: > I found only an example in my personal recent code: > > START = "" > END = "" > TITLEPATTERN = lambda s: "%s" % s > > this three are later used in a very few .find() and .replace() > expressions in the same module. I suppose my point is that while > I agree it should be d

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Samuele Pedroni
Nick Coghlan wrote: Samuele Pedroni wrote: I found only an example in my personal recent code: START = "" END = "" TITLEPATTERN = lambda s: "%s" % s this three are later used in a very few .find() and .replace() expressions in the same module. I suppose my point is that while I agree it shou

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Christian Heimes
Steven schrieb: > Speaking as one of those "some people", my position is that functions > created with lambda are first-class objects the same as everything else > in Python, and a rule that says "You must not assign a lambda to a > name, ever" would be a terrible rule. PEP 8 is for the standard l

Re: [Python-Dev] [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

2008-05-03 Thread skip
Nick> [EMAIL PROTECTED] wrote: Fred> If user-local package installs went to ~/ by default ... with a Fred> way to set an alternate "prefix" instead of ~/ using a distutils Fred> configuration setting, I'd be happy enough. Skip> +1 from me. Nick> But then we clutter up peo

Re: [Python-Dev] [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

2008-05-03 Thread skip
>> - for experienced users (Barry, skip, etc) that want ~/.local to be >> more easily accessible, creating a visible ~/local symlink is an >> utterly trivial exercise. Barry> Hey Nick, I agree with everything above, except that I'd probably Barry> put myself more in Glyph'

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Georg Brandl
Christian Heimes schrieb: Steven schrieb: Speaking as one of those "some people", my position is that functions created with lambda are first-class objects the same as everything else in Python, and a rule that says "You must not assign a lambda to a name, ever" would be a terrible rule. PEP 8

Re: [Python-Dev] [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

2008-05-03 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On May 3, 2008, at 5:05 AM, Nick Coghlan wrote: The major reasons why I think staying out of people's way by default is important: - for people like me (glyph, Georg, etc), it allows us to keep our home directory organised the way we like it. As

Re: [Python-Dev] Invitation to try out open source code review tool

2008-05-03 Thread Stefan Behnel
Guido van Rossum wrote: > What I'm announcing now is the next best thing: an code review tool > for use with Subversion, inspired by Mondrian and (soon to be) > released as open source. Some of the code is even directly derived > from Mondrian. Most of the code is new though, written using Django >

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Alex Martelli
On Fri, May 2, 2008 at 11:32 PM, Mike Klaas <[EMAIL PROTECTED]> wrote: ... > Sorry, that was a bad example. It is obviously silly if the return value > of the function is callable. ...and yet it's *exactly* what keeps happening to lambda-happy programmers -- in production code as well as exam

[Python-Dev] Duplicate tests

2008-05-03 Thread Benjamin Peterson
test_builtin tests most of the builtin types some how or another. All of these also have complete suites elsewhere in the tests. Shouldn't the tests in test_builtin be moved to the type specific tests? -- Cheers, Benjamin Peterson ___ Python-Dev mailin

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Nick Coghlan
Samuele Pedroni wrote: I found only an example in my personal recent code: START = "" END = "" TITLEPATTERN = lambda s: "%s" % s this three are later used in a very few .find() and .replace() expressions in the same module. I suppose my point is that while I agree it should be discouraged and

Re: [Python-Dev] [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

2008-05-03 Thread Nick Coghlan
Barry Warsaw wrote: On May 3, 2008, at 5:05 AM, Nick Coghlan wrote: - for experienced users (Barry, skip, etc) that want ~/.local to be more easily accessible, creating a visible ~/local symlink is an utterly trivial exercise. Hey Nick, I agree with everything above, except that I'd probably

Re: [Python-Dev] Invitation to try out open source code review tool

2008-05-03 Thread Terry Reedy
"Stefan Behnel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Any chance to try it without signing contracts with Google? Depends: Yes. You may read anything without an account. No. You may not write anything to a Google hosted service without a Google account, agreeing to s

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Leif Walsh
On Sat, 3 May 2008, Brett Cannon wrote: > On Sat, May 3, 2008 at 1:03 AM, Terry Reedy <[EMAIL PROTECTED]> wrote: > > Some people write > > somename = lambda args: expression > > instead of the more obvious (to most people) and, dare I say, standard > > def somename(args): return expression

Re: [Python-Dev] Another GSoC Student Introduction

2008-05-03 Thread Robert Schuppenies
Hi Everybody. My name is Robert Schuppenies and I got accepted for this years Google Summer of Code. I will be working on the Python Core with the Memory Usage Profiler project and my mentor will be Martin von Löwis. I am very happy that I got selected and look forward to work on my project. Man

Re: [Python-Dev] Invitation to try out open source code review tool

2008-05-03 Thread Guido van Rossum
On Sat, May 3, 2008 at 11:46 AM, Terry Reedy <[EMAIL PROTECTED]> wrote: > > "Stefan Behnel" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > | Any chance to try it without signing contracts with Google? > > Depends: > > Yes. You may read anything without an account. > > No.

Re: [Python-Dev] Duplicate tests

2008-05-03 Thread Brett Cannon
On Sat, May 3, 2008 at 10:25 AM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: > test_builtin tests most of the builtin types some how or another. All > of these also have complete suites elsewhere in the tests. Shouldn't > the tests in test_builtin be moved to the type specific tests? > The tes

Re: [Python-Dev] [Python-3000] Invitation to try out open source code review tool

2008-05-03 Thread Gregory P. Smith
> > To try it out, go here: > >http://codereview.appspot.com > > Please use the Help link in the top right to read more on how to use > the app. Please sign in using your Google Account (either a Gmail > address or a non-Gmail address registered with Google) to interact > more with the app (you

Re: [Python-Dev] [Python-3000] Invitation to try out open source code review tool

2008-05-03 Thread Brett Cannon
On Sat, May 3, 2008 at 1:20 PM, Gregory P. Smith <[EMAIL PROTECTED]> wrote: > > > > > > To try it out, go here: > > > >http://codereview.appspot.com > > > > Please use the Help link in the top right to read more on how to use > > the app. Please sign in using your Google Account (either a Gmail

Re: [Python-Dev] [Python-3000] Invitation to try out open source code review tool

2008-05-03 Thread Alex Martelli
On Sat, May 3, 2008 at 2:28 PM, Brett Cannon <[EMAIL PROTECTED]> wrote: ... > > I'd be great to integrate this with the bug tracker so that all submitted > > patches automagically show up in codereview with links to one another. > > Yeah, or a simple button to move it over there. Either way

Re: [Python-Dev] [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

2008-05-03 Thread Fred Drake
On May 3, 2008, at 7:51 AM, [EMAIL PROTECTED] wrote: Fred asked for a --prefix flag (which is what I was voting on). I don't really care what you do by default as long as you give me a way to do it differently. What's most interesting (to me) is that no one's commented on my note that my

Re: [Python-Dev] [Python-3000] Reminder: last alphas next Wednesday 07-May-2008

2008-05-03 Thread Nick Coghlan
Fred Drake wrote: On May 3, 2008, at 7:51 AM, [EMAIL PROTECTED] wrote: Fred asked for a --prefix flag (which is what I was voting on). I don't really care what you do by default as long as you give me a way to do it differently. What's most interesting (to me) is that no one's commented on my

Re: [Python-Dev] PEP 8: Discourage named lambdas?

2008-05-03 Thread Martin v. Löwis
> I guess that's inevitable (given lambda's existence... and human > nature;-) and about on the same plane as another hatefully redundant > construct I find myself having to beat upon over and over in code > reviews: > > if : > result = True > else: > result = False > return result > > vs