Re: Name of IDLE on Linux

2005-04-02 Thread Joal Heagney
Edward Diener wrote: Thomas Rast wrote: Edward Diener <[EMAIL PROTECTED]> writes: It is a pity the Python Linux binary installations do not create folders on the desktop or in the Gnome menu system with links to the Python to the documentation and a readme telling me what executables were installe

Re: Docorator Disected

2005-04-02 Thread El Pitonero
Ron_Adam wrote: > > So I didn't know I could do this: > > def foo(a1): > def fee(a2): > return a1+a2 > return fee > > fum = foo(2)(6) <-- !!! Ah, so you did not know functions are objects just like numbers, strings or dictionaries. I think you may have been influenced by othe

Re: Lambda: the Ultimate Design Flaw

2005-04-02 Thread Artie Gold
Torsten Bronger wrote: HallÃchen! Daniel Silva <[EMAIL PROTECTED]> writes: Shriram Krishnamurthi has just announced the following elsewhere; it might be of interest to c.l.s, c.l.f, and c.l.p: http://list.cs.brown.edu/pipermail/plt-scheme/2005-April/008382.html The Fate Of LAMBDA in

Re: Finding attributes in a list

2005-04-02 Thread Marcus Goldfish
> class Player(object): >def __init__(self, **kw): self.__dict__.update(kw) >def __repr__(self): return ''%getattr(self, 'name', > '(anonymous)') > > import operator > [p.name for p in sorted(players, key=operator.attrgetter('attacking'), > reverse=True)] Just happened to read this threa

Re: Docorator Disected

2005-04-02 Thread Ron_Adam
On 2 Apr 2005 20:02:47 -0800, "El Pitonero" <[EMAIL PROTECTED]> wrote: >Ron_Adam wrote: >> >> So I didn't know I could do this: >> >> def foo(a1): >> def fee(a2): >> return a1+a2 >> return fee >> >> fum = foo(2)(6) <-- !!! > >Ah, so you did not know functions are objects just

Re: Finding attributes in a list

2005-04-02 Thread James Stroud
On Saturday 02 April 2005 08:44 pm, Marcus Goldfish wrote: >(2) The Player class looks like a nice model for a data table when one > wants to sort by arbitrary column. Would you agree? The Player class is (and any class) is absolutely fabulous when you have heterogenous data (string,

Re: Finding attributes in a list

2005-04-02 Thread James Stroud
On Saturday 02 April 2005 09:51 pm, James Stroud wrote: > where team could be initialized by a tuple: > >   class Team(list): >     def __init__(self, azip): >       for azip in alist: >         self.data.append(Player(atup)) Sorry, this should read: where team could be initialized by a list of t

Re: Decorator Dissection

2005-04-02 Thread "Martin v. Löwis"
Ron_Adam wrote: I wasn't aware that the form: result = function(args)(args) Was a legal python statement. So python has a built in mechanism for passing multiple argument sets to nested defined functions! (click) Which means this is a decorator without the decorator syntax. No. There is no

Re: Lambda: the Ultimate Design Flaw

2005-04-02 Thread alex goldman
Artie Gold wrote: > Torsten Bronger wrote: >> Hallöchen! >> >> Daniel Silva <[EMAIL PROTECTED]> writes: >> >> >>>Shriram Krishnamurthi has just announced the following elsewhere; it >>>might be of interest to c.l.s, c.l.f, and c.l.p: >>>http://list.cs.brown.edu/pipermail/plt-scheme/2005-April/0

Re: Docorator Disected

2005-04-02 Thread "Martin v. Löwis"
Ron_Adam wrote: Ah, so you did not know functions are objects just like numbers, strings or dictionaries. I think you may have been influenced by other languages where there is a concept of static declaration of functions. No, I did not know that you could pass multiple sets of arguments to nested

Re: testing -- what to do for testing code with behaviour dependant upon which files exist?

2005-04-02 Thread Terry Reedy
"Brian van den Broek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > I'm just starting to employ unit testing (I'm using doctest), and I am > uncertain how to handle writing tests where the behaviour being tested is > dependant on whether certain file paths point to ac

threading.Event file descriptor

2005-04-02 Thread Nicolas Fleury
Hi, Is there any way to get the file descriptor on Unix or handle on Windows associated internally with a threading.Event object? So that it can be used in a call to select or WaitForMultipleObjects. Thx and regards, Nicolas -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding attributes in a list

2005-04-02 Thread Bengt Richter
On Sat, 2 Apr 2005 23:44:11 -0500, Marcus Goldfish <[EMAIL PROTECTED]> wrote: >> class Player(object): >>def __init__(self, **kw): self.__dict__.update(kw) >>def __repr__(self): return ''%getattr(self, 'name', >> '(anonymous)') >> >> import operator >> [p.name for p in sorted(players, key

Re: Docorator Disected

2005-04-02 Thread Bengt Richter
On Sun, 03 Apr 2005 05:09:07 GMT, Ron_Adam <[EMAIL PROTECTED]> wrote: >On 2 Apr 2005 20:02:47 -0800, "El Pitonero" <[EMAIL PROTECTED]> >wrote: > >>Ron_Adam wrote: >>> >>> So I didn't know I could do this: >>> >>> def foo(a1): >>> def fee(a2): >>> return a1+a2 >>> return fee >>> >>>

python-dev Summary for 2005-03-16 through 2005-03-31 (my last)

2005-04-02 Thread Brett C.
[The HTML version of this Summary is available at http://www.python.org/dev/summary/2005-03-16_2005-03-31.html] = Summary Announcements = --- My last summary --- So, after nearly 2.5 years, this is my final python-dev Summary. Ste

<    1   2