[Tutor] mailing list submission

2009-09-20 Thread alok mishra
-- have a good day ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] eazy python question involving functions and, parameters

2009-09-20 Thread Corey Richardson
assume that jade2 is a function that expects two int parameters and returns the value of the larger one. Also assume that four variables, population1 , population2 , population3 , and population4 have already been defined and associated with int values. Write an expre

Re: [Tutor] What is this an example of (and how can i use it?)

2009-09-20 Thread Kent Johnson
On Sun, Sep 20, 2009 at 1:27 PM, kevin parks wrote: > > On Sep 21, 2009, at 1:32 AM, Alan Gauld wrote: > >> kevin parks wrote: >> >>> called, and what it is an example of. I guess there are generators and >>> iterators now and it seems this might be an example of one of those new >> >> This is a g

Re: [Tutor] real world decorators

2009-09-20 Thread Kent Johnson
On Sun, Sep 20, 2009 at 3:40 PM, John wrote: > Hi, > > I think I understand what decorators are and how they work.  Maybe it's just > me but I don't know where I'd use them in my real world programming.  I see > how they work with profile or coverage but does anyone have real world uses. Here are

Re: [Tutor] eazy python question involving functions and parameters

2009-09-20 Thread Alan Gauld
Just think: 4 players left means that this is the semi final. What a brilliant answer! It tells him how to do it if he just stops and thinks but gives nothing away. I love it. :-) Alan G. ___ Tutor maillist - Tutor@python.org To unsubscribe or c

Re: [Tutor] What is this an example of (and how can i use it?)

2009-09-20 Thread Alan Gauld
kevin parks wrote: This is a generator expression. That's unfortunate news for me. It is like a list comprehension (you know about those right?) Yes. I know and use and love them daily. If you can grok comprehensions then you are only a step away from generator expressions. Most of the

Re: [Tutor] eazy python question involving functions and parameters

2009-09-20 Thread Benno Lang
On Mon, Sep 21, 2009 at 5:19 AM, daggerdvm wrote: > > assume that  jade2 is a function that expects two  int parameters and returns > the value of the larger one. > > Also assume that four variables,  population1 ,  population2 ,  population3 > , and  population4 have already been defined and asso

Re: [Tutor] real world decorators

2009-09-20 Thread Eike Welk
On Sunday 20 September 2009, John wrote: > Hi, > > I think I understand what decorators are and how they work. Maybe > it's just me but I don't know where I'd use them in my real world > programming. I see how they work with profile or coverage but does > anyone have real world uses. Frequently

Re: [Tutor] eazy python question involving functions and parameters

2009-09-20 Thread Steve Willoughby
On Sun, Sep 20, 2009 at 01:19:08PM -0700, daggerdvm wrote: > assume that jade2 is a function that expects two int parameters and returns > the value of the larger one. This really smells like a school assignment, which as a general policy we don't solve for you. But as a hint in the right dire

[Tutor] eazy python question involving functions and parameters

2009-09-20 Thread daggerdvm
assume that jade2 is a function that expects two int parameters and returns the value of the larger one. Also assume that four variables, population1 , population2 , population3 , and population4 have already been defined and associated with int values. Write an expression (not a statem

[Tutor] real world decorators

2009-09-20 Thread John
Hi, I think I understand what decorators are and how they work. Maybe it's just me but I don't know where I'd use them in my real world programming. I see how they work with profile or coverage but does anyone have real world uses. I mostly create wxPython apps and don't see where they migh

Re: [Tutor] What is this an example of (and how can i use it?)

2009-09-20 Thread kevin parks
On Sep 21, 2009, at 1:32 AM, Alan Gauld wrote: kevin parks wrote: called, and what it is an example of. I guess there are generators and iterators now and it seems this might be an example of one of those new This is a generator expression. That's unfortunate news for me. It is like

Re: [Tutor] What is this an example of (and how can i use it?)

2009-09-20 Thread Alan Gauld
kevin parks wrote: called, and what it is an example of. I guess there are generators and iterators now and it seems this might be an example of one of those new This is a generator expression. It is like a list comprehension (you know about those right?) except it doesn't create the list it

Re: [Tutor] Determine Filetype

2009-09-20 Thread Alan Gauld
ad...@gg-lab.net wrote: The search feature of the web site is quite effective! :-) simple to be used if you're looking for a very common word ("in") and don't know other keys to find it. To be honest I was being a bit optimistic but I did just type "in" for the search and the first 5 or so h

Re: [Tutor] What is this an example of (and how can i use it?)

2009-09-20 Thread Kent Johnson
On Sun, Sep 20, 2009 at 9:10 AM, kevin parks wrote: > I am afraid that in the long layoff in python has meant some new constructs > have passed me by. In googling around I found some nice little code I want > to use, but i don't quite understand it, how it is called, and what it is an > example of

Re: [Tutor] list sort problem solved

2009-09-20 Thread Dave Angel
Rayon wrote: list = bigMethod() # this method makes the list list.sort() # here is the sort thanks for x in list: # out put the sort print x it all works Thanks a lot -- From: "Dave Angel" Sent: Saturday, September 19, 2009 7:46 PM To: "Rayon"

Re: [Tutor] list sort problem solved

2009-09-20 Thread Rayon
list = bigMethod() # this method makes the list list.sort() # here is the sort thanks for x in list: # out put the sort print x it all works Thanks a lot -- From: "Dave Angel" Sent: Saturday, September 19, 2009 7:46 PM To: "Rayon" Cc: Subject

[Tutor] What is this an example of (and how can i use it?)

2009-09-20 Thread kevin parks
I am afraid that in the long layoff in python has meant some new constructs have passed me by. In googling around I found some nice little code I want to use, but i don't quite understand it, how it is called, and what it is an example of. I guess there are generators and iterators now and

Re: [Tutor] Determine Filetype

2009-09-20 Thread ad...@gg-lab.net
Thankyou guys. > The search feature of the web site is quite effective! :-) Alan, i know that every site has a search function, but they're not so simple to be used if you're looking for a very common word ("in") and don't know other keys to find it. Regards, Giorgio