Re: [Tutor] General design question

2008-07-02 Thread Alan Gauld
"Paul Melvin" <[EMAIL PROTECTED]> wrote For example, if I generate some numbers using range the only way I could easily sum them was to append them to a list and then call the sum function, if I tried without the list I couldn't sum them at all. Lots of good general answers but specifically

Re: [Tutor] General design question

2008-07-02 Thread Paul Melvin
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Lie Ryan > Sent: 02 July 2008 16:31 > To: tutor@python.org > Subject: Re: [Tutor] General design question (Tim Golden) > > > If I have a set of numbers, or strings etc.

Re: [Tutor] General design question (Tim Golden)

2008-07-02 Thread Lie Ryan
> If I have a set of numbers, or strings etc. which have been generated > and I then want to do something with them, for example a sum function > call. Is the best way to put those items in a list, or similar > container, before applying the function. The best design tips I could give is not

Re: [Tutor] General design question

2008-07-02 Thread Kent Johnson
On Wed, Jul 2, 2008 at 6:31 AM, Daniele <[EMAIL PROTECTED]> wrote: >>> If I have a set of numbers, or strings etc. which have been generated and I >>> then want to do something with them, for example a sum function call. Is >>> the best way to put those items in a list, or similar container, bef

Re: [Tutor] General design question

2008-07-02 Thread Kent Johnson
On Wed, Jul 2, 2008 at 5:54 AM, Tim Golden <[EMAIL PROTECTED]> wrote: > Paul Melvin wrote: >> >> If I have a set of numbers, or strings etc. which have been generated and >> I then want to do something with them, for example a sum function call. Is >> the best way to put those items in a list, or

Re: [Tutor] General design question

2008-07-02 Thread Daniele
>> If I have a set of numbers, or strings etc. which have been generated and I >> then want to do something with them, for example a sum function call. Is >> the best way to put those items in a list, or similar container, before >> applying the function. > > Not only "best" but "necessary". th

Re: [Tutor] General design question

2008-07-02 Thread Tim Golden
Paul Melvin wrote: If I have a set of numbers, or strings etc. which have been generated and I then want to do something with them, for example a sum function call. Is the best way to put those items in a list, or similar container, before applying the function. Not only "best" but "necessar

[Tutor] General design question

2008-07-02 Thread Paul Melvin
Hi, I am new to python and although have done basic many, many years ago it has all gone, replaced by rubbish! My question is this: If I have a set of numbers, or strings etc. which have been generated and I then want to do something with them, for example a sum function call. Is the b