[Tutor] List and tuple question -resend #2

2008-05-04 Thread quantrum75
Sincerely sorry for spamming everybody. Dint know about yahoo's quirks regarding html attachments.. Hopefully this works. Hi everybody I have a simple newbie kind of questions. I have tried hard to solve it, but couldn't figure it out. The problem is, I want to make a tuple of tuples or a list

Re: [Tutor] list and tuple question

2008-05-04 Thread Alan Gauld
quantrum75 [EMAIL PROTECTED] wrote in Hi everybody Hi, I think the key to your question is here: a=((1,),(2,),(3,),(4,),(5,)) I need the comma since it is going into an excel sheet. I think you are confused between tuples and comma separated strings - which is what you

Re: [Tutor] List comprehensions

2008-04-10 Thread Alan Gauld
Dinesh B Vadhia [EMAIL PROTECTED] wrote i I'm using a Javascript autocomplete plugin for an online web application/service. Each time a user inputs a character, the character is sent to the backend Python program which searches for the character in a list of 10,000 string items. Eeek!

Re: [Tutor] List comprehensions

2008-04-10 Thread linuxian iandsd
also if you need to go for 2 results I propose you use filters interactive menus which will help you tailor the query to the users desires thus limit the query results. ___ Tutor maillist - Tutor@python.org

Re: [Tutor] List comprehensions

2008-04-10 Thread linuxian iandsd
i think you are using ajax ... which undoubdetly uses an sql database since its based on queries run from whithin the application in the browser whithout the need for refreshing the page ... i would suggest you try serching internet for something like google autocomplete feature i guess the

Re: [Tutor] List comprehensions

2008-04-10 Thread W W
My guess, though I'm not sure, is that google uses hashes... why? Because they're a *ahem* load faster than loops, and the reason is they replace the repetitive nature of a loop by using some type of formula. Exactly /how/ this is implemented, I'm not sure. A simple example of the speed

Re: [Tutor] List comprehensions

2008-04-10 Thread Kent Johnson
Dinesh B Vadhia wrote: Kent I'm using a Javascript autocomplete plugin for an online web application/service. Each time a user inputs a character, the character is sent to the backend Python program which searches for the character in a list of 10,000 string items. Once it finds the

Re: [Tutor] List comprehensions

2008-04-10 Thread Alan Gauld
Kent Johnson [EMAIL PROTECTED] wrote application/service. Each time a user inputs a character, the character is sent to the backend Python program which searches for the character in a list of 10,000 string items. Once it finds the character, the backend will return that string and N

Re: [Tutor] List comprehensions

2008-04-10 Thread Kent Johnson
Alan Gauld wrote: One possibility is that the javascript fetches the list back on the first few characters and caches it on the browser Here is an autocomplete widget I use that can do exactly that: http://www.dyve.net/jquery/?autocomplete Kent ___

Re: [Tutor] List comprehensions

2008-04-10 Thread bob gailer
. Dinesh - Original Message - *From:* Kent Johnson mailto:[EMAIL PROTECTED] *To:* Dinesh B Vadhia mailto:[EMAIL PROTECTED] *Cc:* tutor@python.org mailto:tutor@python.org *Sent:* Wednesday, April 09, 2008 1:48 PM *Subject:* Re: [Tutor] List comprehensions Dinesh B Vadhia wrote

[Tutor] List comprehensions

2008-04-09 Thread Dinesh B Vadhia
Here is a for loop operating on a list of string items: data = [string 1, string 2, string 3, string 4, string 5, string 6, string 7, string 8, string 9, string 10, string 11] result = for item in data: result = item + \n print result I want to replace the for loop with a List

Re: [Tutor] List comprehensions

2008-04-09 Thread Jerry Hill
On Wed, Apr 9, 2008 at 7:12 AM, Dinesh B Vadhia [EMAIL PROTECTED] wrote: I want to replace the for loop with a List Comrehension (or whatever) to improve performance (as the data list will be 10,000]. At each stage of the for loop I want to print the result ie. List comprehensions are for

Re: [Tutor] List comprehensions

2008-04-09 Thread linuxian iandsd
On Wed, Apr 9, 2008 at 7:44 PM, Jerry Hill [EMAIL PROTECTED] wrote: On Wed, Apr 9, 2008 at 7:12 AM, Dinesh B Vadhia [EMAIL PROTECTED] wrote: I want to replace the for loop with a List Comrehension (or whatever) to improve performance (as the data list will be 10,000]. At each stage of

Re: [Tutor] List comprehensions

2008-04-09 Thread Dinesh B Vadhia
: [Tutor] List comprehensions Dinesh B Vadhia wrote: Here is a for loop operating on a list of string items: data = [string 1, string 2, string 3, string 4, string 5, string 6, string 7, string 8, string 9, string 10, string 11] result = for item in data: result = item + \n print

Re: [Tutor] List comprehensions

2008-04-09 Thread linuxian iandsd
:* tutor@python.org *Sent:* Wednesday, April 09, 2008 12:40 PM *Subject:* Re: [Tutor] List comprehensions Dinesh B Vadhia wrote: Here is a for loop operating on a list of string items: data = [string 1, string 2, string 3, string 4, string 5, string 6, string 7, string 8, string 9, string 10

Re: [Tutor] List comprehensions

2008-04-09 Thread Kent Johnson
Dinesh B Vadhia wrote: Here is a for loop operating on a list of string items: data = [string 1, string 2, string 3, string 4, string 5, string 6, string 7, string 8, string 9, string 10, string 11] result = for item in data: result = item + \n print result I'm not sure what

Re: [Tutor] List comprehensions

2008-04-09 Thread Kent Johnson
Dinesh B Vadhia wrote: Here is a for loop operating on a list of string items: data = [string 1, string 2, string 3, string 4, string 5, string 6, string 7, string 8, string 9, string 10, string 11] result = for item in data: result = some operation on item print result

Re: [Tutor] List comprehensions

2008-04-09 Thread Jerry Hill
On Wed, Apr 9, 2008 at 4:15 PM, Dinesh B Vadhia [EMAIL PROTECTED] wrote: Sorry, let's start again. This version really isn't any more helpful than the first one. I know you corrected the sample code, but you haven't addressed any of the fundamental questions that Kent or I asked. I want to

Re: [Tutor] List comprehensions

2008-04-09 Thread Jerry Hill
On Wed, Apr 9, 2008 at 4:48 PM, Kent Johnson [EMAIL PROTECTED] wrote: You could use [ sys.stdout.write(some operation on item) for item in data ] but I consider this bad style and I seriously doubt you will see any difference in performance. This really isn't a good idea. It will take

[Tutor] list

2008-03-21 Thread elis aeris
how do I create an empy int array of 10? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] list

2008-03-21 Thread Andreas Kostyrka
Empty? array = [] If you want to assign 10 None, that would be: array = [None] * 10 Andreas Am Freitag, den 21.03.2008, 17:03 -0700 schrieb elis aeris: how do I create an empy int array of 10? ___ Tutor maillist - Tutor@python.org

Re: [Tutor] list

2008-03-21 Thread elis aeris
arra = [0] * 10 ? On Fri, Mar 21, 2008 at 5:29 PM, Andreas Kostyrka [EMAIL PROTECTED] wrote: Empty? array = [] If you want to assign 10 None, that would be: array = [None] * 10 Andreas Am Freitag, den 21.03.2008, 17:03 -0700 schrieb elis aeris: how do I create an empy int array of

Re: [Tutor] list

2008-03-21 Thread Steve Willoughby
elis aeris wrote: arra = [0] * 10 ? If you want a list of ten zeroes, yes. A couple of suggestions: Find a tutorial introduction to Python such as those on python.org, or google for dive into python, and go through the examples in there. Also, use the interactive Python interpreter to try out

[Tutor] List Box for Web

2008-02-26 Thread Dinesh B Vadhia
I know this isn't the right forum to ask but I'll try as someone might know. For my web application, I need a list box with a search capability. An example is the Python documentation (hit the F1 key under Windows from IDLE) and specifically the Index list ie. context-sensitive search through

Re: [Tutor] List Box for Web

2008-02-26 Thread Luciano Ramalho
On Wed, Feb 27, 2008 at 2:21 AM, Dinesh B Vadhia [EMAIL PROTECTED] wrote: For my web application, I need a list box with a search capability. An example is the Python documentation (hit the F1 key under Windows from IDLE) and specifically the Index list ie. context-sensitive search through a

[Tutor] the tutor list has been strangely silent for a few days. Anyone know

2008-01-17 Thread bill.wu
the tutor list has been strangely silent for a few days. Anyone know what has happened? why? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] the tutor list has been strangely silent for a few days. Anyone know

2008-01-17 Thread Luke Paireepinart
bill.wu wrote: the tutor list has been strangely silent for a few days. Anyone know what has happened? why? I got about 20 e-mails from the list yesterday. Do you consider this slient? or do you maybe have a problem receiving messages

Re: [Tutor] the tutor list has been strangely silent for a few days. Anyone know

2008-01-17 Thread Dick Moores
At 06:41 PM 1/17/2008, bill.wu wrote: the tutor list has been strangely silent for a few days. Anyone know what has happened? why? FYI I see 34 messages in my Eudora Tutor mailbox, dated 1/16 Pacific Time (Eudora converts the datetimes to my time zone, PT). Here's a screenshot of that mailbox

Re: [Tutor] List processing question - consolidating duplicate entries

2007-11-29 Thread Richard Querin
On Nov 27, 2007 5:40 PM, Kent Johnson [EMAIL PROTECTED] wrote: This is a two-liner using itertools.groupby() and operator.itemgetter: data = [['Bob', '07129', 'projectA', '4001',5], ['Bob', '07129', 'projectA', '5001',2], ['Bob', '07101', 'projectB', '4001',1], ['Bob', '07140', 'projectC',

Re: [Tutor] List processing question - consolidating duplicate entries

2007-11-29 Thread Kent Johnson
Richard Querin wrote: import itertools, operator for k, g in itertools.groupby(sorted(data), key=operator.itemgetter(0, 1, 2, 3)): print k, sum(item[4] for item in g) I'm trying to understand what's going on in the for statement but I'm having troubles. The

Re: [Tutor] List processing question - consolidating duplicateentries

2007-11-28 Thread Tiger12506
s=set() [s.add(tuple(x)) for x in myEntries] myEntries = [list(x) for x in list(s)] This could be written more concisely as... s = set(tuple(x) for x in myEntries) myEntries = [list(x) for x in list(s)] Generator expressions are really cool. Not what the OP asked for exactly. He wanted to

Re: [Tutor] List processing question - consolidating duplicate entries

2007-11-28 Thread Kent Johnson
Michael Langford wrote: What you want is a set of entries. Not really; he wants to aggregate entries. # remove duplicate entries # # myEntries is a list of lists, #such as [[1,2,3],[1,2,foo],[1,2,3]] # s=set() [s.add(tuple(x)) for x in myEntries] A set can be constructed directly

[Tutor] List processing question - consolidating duplicate entries

2007-11-27 Thread Richard Querin
I'm trying to process a list and I'm stuck. Hopefully someone can help me out here: I've got a list that is formatted as follows: [Name,job#,jobname,workcode,hours] An example might be: [Bob,07129,projectA,4001,5] [Bob,07129,projectA,5001,2] [Bob,07101,projectB,4001,1]

Re: [Tutor] List processing question - consolidating duplicate entries

2007-11-27 Thread John Fouhy
On 28/11/2007, Richard Querin [EMAIL PROTECTED] wrote: I've got a list that is formatted as follows: [Name,job#,jobname,workcode,hours] [...] Now I'd like to consolidate entries that are duplicates. Duplicates meaning entries that share the same Name, job#, jobname and workcode. So for the

Re: [Tutor] List processing question - consolidating duplicate entries

2007-11-27 Thread bob gailer
Richard Querin wrote: I'm trying to process a list and I'm stuck. Hopefully someone can help me out here: I've got a list that is formatted as follows: [Name,job#,jobname,workcode,hours] An example might be: [Bob,07129,projectA,4001,5] [Bob,07129,projectA,5001,2]

Re: [Tutor] List processing question - consolidating duplicate entries

2007-11-27 Thread Kent Johnson
bob gailer wrote: 2 - Sort the list. Create a new list with an entry for the first name, project, workcode. Step thru the list. Each time the name, project, workcode is the same, accumulate hours. When any of those change, create a list entry for the next name, project, workcode and again

Re: [Tutor] List processing question - consolidating duplicate entries

2007-11-27 Thread Michael Langford
What you want is a set of entries. Unfortunately, python lists are not hashable which means you have to convert them to something hashable before you can use the python set datatype. What you'd like to do is add each to a set while converting them to a tuple, then convert them back out of the

Re: [Tutor] List comp question

2007-11-03 Thread Michael Langford
I decided you probably should also have a cleanup function since garbage collection won't work now unless you explicitly clean the function. This approach works, and also works if you call the function again after you've called cleanup (it just runs the function 1 more time, then again, returns

Re: [Tutor] List comp question

2007-11-03 Thread Eric Brunson
Ricardo Aráoz wrote: Kent Johnson wrote: I am building a list like this: tree = [] for top in tops: l2 = level2(top) if l2: tree.append((top, l2)) I would really like to turn this into a list comprehension: tree = [ (top, level2(top)) for

Re: [Tutor] List comp question

2007-11-03 Thread Ricardo Aráoz
Eric Brunson wrote: Ricardo Aráoz wrote: Kent Johnson wrote: I am building a list like this: tree = [] for top in tops: l2 = level2(top) if l2: tree.append((top, l2)) I would really like to turn this into a list comprehension: tree = [

[Tutor] List comp question

2007-11-02 Thread Kent Johnson
I am building a list like this: tree = [] for top in tops: l2 = level2(top) if l2: tree.append((top, l2)) I would really like to turn this into a list comprehension: tree = [ (top, level2(top)) for top in tops if level2(top) ] but the call to level2()

Re: [Tutor] List comp question

2007-11-02 Thread Michael Langford
Decorate level2 with a decorator that caches: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/425445 --Michael On 11/1/07, Kent Johnson [EMAIL PROTECTED] wrote: I am building a list like this: tree = [] for top in tops: l2 = level2(top) if l2:

Re: [Tutor] List comp question

2007-11-02 Thread Ricardo Aráoz
Kent Johnson wrote: I am building a list like this: tree = [] for top in tops: l2 = level2(top) if l2: tree.append((top, l2)) I would really like to turn this into a list comprehension: tree = [ (top, level2(top)) for top in tops if

Re: [Tutor] List comp question

2007-11-02 Thread Alan Gauld
Kent Johnson [EMAIL PROTECTED] wrote I would really like to turn this into a list comprehension: tree = [ (top, level2(top)) for top in tops if level2(top) ] but the call to level2() is expensive enough that I don't want to repeat it. Is there any way to do this or am I stuck with the

[Tutor] list iteration question for writing to a file on disk

2007-09-14 Thread sacha rook
Hi can someone help with this please? i got to this point with help from the list. from BeautifulSoup import BeautifulSoupdoc = ['htmlheadtitlePage title/title/head', 'bodyp id=firstpara align=centerThis is paragraph bone/b.', 'p id=secondpara align=blahThis is paragraph

[Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Dick Moores
When sending a reply to a post, to the list, should we also address the reply to the author of the post to which we are replying? (There's gotta be an easier way to say that..) If we do so, then the author gets a duplicate of our reply. I've run some statistics (but no more bar graphs ;-) ).

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Eric Brunson
Dick Moores wrote: When sending a reply to a post, to the list, should we also address the reply to the author of the post to which we are replying? (There's gotta be an easier way to say that..) If we do so, then the author gets a duplicate of our reply. I've run some statistics (but no

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Luke Paireepinart
Dick Moores wrote: When sending a reply to a post, to the list, should we also address the reply to the author of the post to which we are replying? (There's gotta be an easier way to say that..) If we do so, then the author gets a duplicate of our reply. I've run some statistics (but no

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Kent Johnson
Dick Moores wrote: When sending a reply to a post, to the list, should we also address the reply to the author of the post to which we are replying? (There's gotta be an easier way to say that..) If we do so, then the author gets a duplicate of our reply. This is configurable for each

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Tom Fitzhenry
On Tue, Aug 14, 2007 at 11:06:05AM -0700, Dick Moores wrote: Replying only to the list takes a bit of trouble. The default behavior seems to be that the Reply button addresses the author only and not the list; Reply to all addresses both the list, the author, and any others included in the

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Dick Moores
At 11:56 AM 8/14/2007, Kent Johnson wrote: Dick Moores wrote: When sending a reply to a post, to the list, should we also address the reply to the author of the post to which we are replying? (There's gotta be an easier way to say that..) If we do so, then the author gets a duplicate of

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread Carroll, Barry
Date: Tue, 14 Aug 2007 12:33:16 -0700 From: Dick Moores [EMAIL PROTECTED] Subject: Re: [Tutor] Question re Tutor List Etiquette To: tutor@python.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii; format=flowed At 11:56 AM 8/14/2007, Kent Johnson wrote: Dick

Re: [Tutor] Question re Tutor List Etiquette

2007-08-14 Thread William O'Higgins Witteman
On Tue, Aug 14, 2007 at 08:11:33PM +0100, Tom Fitzhenry wrote: On Tue, Aug 14, 2007 at 11:06:05AM -0700, Dick Moores wrote: Replying only to the list takes a bit of trouble. The default behavior seems to be that the Reply button addresses the author only and not the list; Reply to all

[Tutor] List within Dictionary

2007-06-20 Thread pearl jb
I wanted to know How to access the list elements which is in Dictionary dict = {'John':['ph=919873673','res=91928827737'] , 'William' : ['ph=91983763','res=91837474848'] } I want the output to be 1. John res=91928827737 2. William ph=91983763 -

Re: [Tutor] List within Dictionary

2007-06-20 Thread Kent Johnson
pearl jb wrote: I wanted to know How to access the list elements which is in Dictionary dict = {'John':['ph=919873673','res=91928827737'] , 'William' : ['ph=91983763','res=91837474848'] } I want the output to be 1. John res=91928827737 2. William ph=91983763 You can use

[Tutor] List slicing and joining

2007-04-11 Thread Ben Sherman
I've got a list that contain a bunch of information, including the FQDN of a host. host_data=['foo.example.com', 'other unimportant data'] I need to seperate the hostname from the domain name. This is how I'm doing it, and it work, but it seems *really* hacky. Is there a better (or more

Re: [Tutor] List slicing and joining

2007-04-11 Thread Andreas Kostyrka
* Ben Sherman [EMAIL PROTECTED] [070411 22:02]: I've got a list that contain a bunch of information, including the FQDN of a host. host_data=['foo.example.com', 'other unimportant data'] I need to seperate the hostname from the domain name. This is how I'm doing it, and it work, but it

Re: [Tutor] List and comprehension questions

2007-02-25 Thread Kent Johnson
Smith, Jeff wrote: I'm getting use to using list iteration and comprehension but still have some questions. 1. I know to replace for i in range(len(list1)): do things with list1[i] with for li in list1: do things with li but what if there are two lists that you

Re: [Tutor] List and comprehension questions

2007-02-25 Thread Bob Gailer
Kent Johnson wrote: Smith, Jeff wrote: I'm getting use to using list iteration and comprehension but still have some questions. 1. I know to replace for i in range(len(list1)): do things with list1[i] with for li in list1: do things with li but what if there

Re: [Tutor] list problem

2007-02-21 Thread Michael Lange
On Wed, 21 Feb 2007 21:21:26 +1300 John Fouhy [EMAIL PROTECTED] wrote: Kirk Bailey wrote: ok, here comes some code: f1=open(pagename,'r') page=f1.readlines() f1.close() at the end of which, the data is in page, which is a list. But something strange is going on here. all

Re: [Tutor] list problem

2007-02-21 Thread Kent Johnson
Kirk Bailey wrote: ok, here comes some code: f1=open(pagename,'r') page=f1.readlines() f1.close() at the end of which, the data is in page, which is a list. But something strange is going on here. all the data is in a single cell! it's a one cell list! Say what? It sounds like for

[Tutor] list problem

2007-02-20 Thread Kirk Bailey
ok, getting back to python and wikiness, I have a problem, this software of mine seems to exibit different behavior under the latest edition of python (2.5) than under the version used when I first wrote it (2.3). It loads the page file, but returns it as a list (which is correcft) of one

Re: [Tutor] list problem

2007-02-20 Thread Luke Paireepinart
Kirk Bailey wrote: ok, getting back to python and wikiness, I have a problem, this software of mine seems to exibit different behavior under the latest edition of python (2.5) than under the version used when I first wrote it (2.3). It loads the page file, but returns it as a list (which is

Re: [Tutor] list problem

2007-02-20 Thread Rikard Bosnjakovic
On 2/21/07, Kirk Bailey [EMAIL PROTECTED] wrote: [...] Discussion on or off list is saught. Constructive criticism will be graciously received and thanked. Without links, pointers, code or anything grippable I find it difficult to comment or discuss anything, since i haven't got the faintest

Re: [Tutor] list problem

2007-02-20 Thread Luke Paireepinart
Kirk: Please reply to this message, not the other one I sent, and please reply on-list in the future, using the 'reply-all' button rather than 'reply.' Otherwise the message just goes to me instead of to everyone, which is the default on this list. This copy of your e-mail is forwarded to the

Re: [Tutor] Replying to the tutor-list

2007-02-18 Thread Dave Kuhlman
On Fri, Feb 16, 2007 at 11:28:21AM +, Tim Golden wrote: Kent Johnson wrote: Tim Golden wrote: field and [EMAIL PROTECTED] in cc: My problem there is that I usually don't want to send the originating individual a private copy of an email he/she is going to receive from the list in any

Re: [Tutor] Replying to the tutor-list

2007-02-18 Thread Tim Golden
Dave Kuhlman wrote: On Fri, Feb 16, 2007 at 11:28:21AM +, Tim Golden wrote: Kent Johnson wrote: Tim Golden wrote: field and [EMAIL PROTECTED] in cc: My problem there is that I usually don't want to send the originating individual a private copy of an email he/she is going to receive from

Re: [Tutor] Replying to the tutor-list

2007-02-16 Thread Alan Gauld
Luke Paireepinart [EMAIL PROTECTED] wrote It's not the inconvenience but the fact that it's nonstandard, as far as every mailing list i've been on except this. It is interesting to see this thread because its a hot button of mine that many new mailing lists implement this non standard

Re: [Tutor] Replying to the tutor-list

2007-02-16 Thread Tim Golden
Alan Gauld wrote: But its obvious there are two views at work here. (The one which sees an apostrophe in it's and the one which doesn't? ;) But, joking aside, I think you've summarised the situation quite well, and I suspect that -- given the what must be thousands of mailing lists and

Re: [Tutor] Replying to the tutor-list

2007-02-16 Thread Tim Golden
Tim Golden wrote: Alan Gauld wrote: But its obvious there are two views at work here. (The one which sees an apostrophe in it's and the one which doesn't? ;) But, joking aside, I think you've summarised the situation quite well, and I suspect that -- given the what must be thousands of

Re: [Tutor] Replying to the tutor-list

2007-02-16 Thread Kent Johnson
Tim Golden wrote: field and [EMAIL PROTECTED] in cc: My problem there is that I usually don't want to send the originating individual a private copy of an email he/she is going to receive from the list in any case, so I usually cut-and-paste around so that only the list is in To: AFAIK, TB

Re: [Tutor] Replying to the tutor-list

2007-02-16 Thread Tim Golden
Kent Johnson wrote: Tim Golden wrote: field and [EMAIL PROTECTED] in cc: My problem there is that I usually don't want to send the originating individual a private copy of an email he/she is going to receive from the list in any case, so I usually cut-and-paste around so that only the list

Re: [Tutor] Replying to the tutor-list

2007-02-16 Thread Michael P. Reilly
On 2/16/07, Alan Gauld [EMAIL PROTECTED] wrote: As to standard list behaviour, I don't know of any list thats been around for more than say 10 years that uses Reply to send to All. This seems to be a very recent thing. (And most of the lists I am on have been around for much more than 10 years!

Re: [Tutor] Replying to the tutor-list

2007-02-16 Thread Michael P. Reilly
On 2/16/07, ALAN GAULD [EMAIL PROTECTED] wrote: However, the standard behavior at the time was that replies went back to the mailing list, not to the original sender. But the mailing list was the original sender so it was all wonderfully consistent. Reply goes to sender only, which happens

Re: [Tutor] Replying to the tutor-list

2007-02-16 Thread Roel Schroeven
Tim Golden schreef: I would take minor issue -- with you, and with the creators of Thunderbird which is my current mail client of choice. It looks to me as though you're suggesting that the reply-all button is there to reply to a list, whereas it seems to me to be there to reply to all the

Re: [Tutor] Replying to the tutor-list

2007-02-16 Thread Carroll, Barry
Greetings: I just thought I'd throw my own hat into the ring. I'm trying out my new, asbestos-free, flame-retardant underwear. ;^) -Original Message- Date: Fri, 16 Feb 2007 08:14:29 -0500 From: Michael P. Reilly [EMAIL PROTECTED] Subject: Re: [Tutor] Replying to the tutor-list

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Andre Engels
2007/2/14, Alan Gauld [EMAIL PROTECTED]: Because hitting Reply and sending to a list would only be consistent if the list was the originator of the message. Some mailing lists do implement this bizarre and non-standard email behaviour but thankfully the Python community doesn't! This behaviour

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Rikard Bosnjakovic
On 2/15/07, Andre Engels [EMAIL PROTECTED] wrote: It's getting to be the majority of mailing lists that do it the other way, and I find it quite irritating that this list does not - I have had several times that I sent a mail, and after sending it, sometimes long after sending it, I realize I

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Rikard Bosnjakovic
On 2/14/07, Mike Hansen [EMAIL PROTECTED] wrote: The following tutor faq has an explanation: http://www.python.org/infogami-faq/tutor/tutor-why-do-my-replies-go-to-t he-person-who-sent-the-message-and-not-to-the-list/ I think the argument in that explanation sucks. A asks something, B

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Richard Querin
On 2/14/07, Mike Hansen [EMAIL PROTECTED] wrote: The following tutor faq has an explanation: http://www.python.org/infogami-faq/tutor/tutor-why-do-my-replies-go-to-t he-person-who-sent-the-message-and-not-to-the-list/ It seems like this is designed for the 5% case when it makes the

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Alan Gauld
Richard Querin [EMAIL PROTECTED] wrote The following tutor faq has an explanation: http://www.python.org/infogami-faq/tutor/tutor-why-do-my-replies-go-to-t he-person-who-sent-the-message-and-not-to-the-list/ It seems like this is designed for the 5% case when it makes the other 95%

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Richard Querin
On 2/15/07, Alan Gauld [EMAIL PROTECTED] wrote: I dunno about you but 95% of my email is private, only about 5% comes from mailing lists. Yeah, me too, but I guess it seems easier to just hit 'reply' 100% of the time and have it go to the right recipient. My point really was that 95% of

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Andre Engels
2007/2/15, ALAN GAULD [EMAIL PROTECTED]: realize I sent it to the sender instead of the list, so I send a second message after it. So do you find it odd when dealing with normal email and you hit reply and it only goes to the sender? No, because it is sent by the sender to me, not to

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Bill Campbell
The major reason for not setting Reply-To: thelist is that it makes it *SLIGHTLY* more difficult to post something to the list and replys should go to the sender. IHMO, one should have to go to a little bit of effort before posting a message that may go to thousands of recipients. Using the

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Luke Paireepinart
Bill Campbell wrote: The major reason for not setting Reply-To: thelist is that it makes it *SLIGHTLY* more difficult to post something to the list and replys should go to the sender. IHMO, one should have to go to a little bit of effort before posting a message that may go to thousands of

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Bill Campbell
On Thu, Feb 15, 2007, Luke Paireepinart wrote: Bill Campbell wrote: The major reason for not setting Reply-To: thelist is that it makes it *SLIGHTLY* more difficult to post something to the list and replys should go to the sender. IHMO, one should have to go to a little bit of effort before

Re: [Tutor] Replying to the tutor-list

2007-02-15 Thread Terry Carroll
On Thu, 15 Feb 2007, Bill Campbell wrote: Having the Reply-To: to the original poster minimizes the probability of somebody sending mail to a list that was intended for the original poster (which may be private). Well, no. It minimizes the probability of someone sending mail to a list.

[Tutor] Replying to the tutor-list

2007-02-14 Thread Rikard Bosnjakovic
All texts that I reply to this list are automatically sent to the author, or - by selecting Reply all in my mail client - the tutorlist gets a CC. Why is there no reply-to-tag in all the posts, making the list recipient at all times? -- - Rikard. ___

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread Mike Hansen
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rikard Bosnjakovic Sent: Wednesday, February 14, 2007 9:21 AM To: tutor@python.org Subject: [Tutor] Replying to the tutor-list All texts that I reply to this list are automatically sent

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread Dave Kuhlman
On Wed, Feb 14, 2007 at 05:20:44PM +0100, Rikard Bosnjakovic wrote: Why is there no reply-to-tag in all the posts, making the list recipient at all times? Believe it or not -- The email reader that I use (mutt on a FreeBSD machine that I telnet/ssh into) has a reply-to-list operation. That's

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread J or M Montgomery
' and 'Reply all' options. when I send a message using 'Reply it goes only to the Tutor List. Using the 'Reply all choice it goes to the prior poster with a copy to the list. John Montgomery ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread Alan Gauld
Rikard Bosnjakovic [EMAIL PROTECTED] wrote All texts that I reply to this list are automatically sent to the author, or - by selecting Reply all in my mail client - the tutorlist gets a CC. Yep, that makes sense. It's how mail tools work in a sane world. You Reply and it goes to the sender.

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread Terry Carroll
prefer that, but it's a matter of taste, and this lists tastes don't run that way. I use procmail to add a Reply-To: header, and then dump the email into my separate Python in-box: # Python tutor list :0: * [EMAIL PROTECTED] { :0hf | $FORMAIL -A Reply-To: tutor@python.org

Re: [Tutor] List to dictionary

2006-12-07 Thread Luke Paireepinart
Dick Moores wrote: At 09:53 PM 12/6/2006, Luke Paireepinart wrote: # Remove duplicates from a list: L = [1,2,2,3,3,3] [x for x in L if x not in locals()['_[1]'].__self__] [1,2,3] Why not L = [1,2,2,3,3,3] list(set(L)) [1, 2, 3] Because the other methods (via set or dict keys) don't

Re: [Tutor] List to dictionary

2006-12-07 Thread Kent Johnson
Luke Paireepinart wrote: How about this :D # Remove duplicates from a list: L = [1,2,2,3,3,3] [x for x in L if x not in locals()['_[1]'].__self__] [1,2,3] [accessed at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/204297 ] The problems with this are, it is not portable, even

[Tutor] List to dictionary question

2006-12-06 Thread Morpheus
I'm new to programming, and trying to learn the Python language. The following code does what I want it to do, but I have not idea how it works. def scanList(names,temp): for i in names: temp[i] = 0 print temp Names = [] temp = {} I have a list of names (Names[]) and want to

Re: [Tutor] List to dictionary question

2006-12-06 Thread Mike Hansen
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Morpheus Sent: Wednesday, December 06, 2006 9:00 AM To: tutor@python.org Subject: [Tutor] List to dictionary question I'm new to programming, and trying to learn the Python language

[Tutor] List to dictionary

2006-12-06 Thread Morpheus
I'm new to programming, and trying to learn the Python language. The following code does what I want it to do, but I have not idea how it works. def scanList(names,temp): for i in names: temp[i] = 0 print temp Names = [] temp = {} I have a list of names (Names[]) and want to

Re: [Tutor] List to dictionary

2006-12-06 Thread Dick Moores
At 09:53 PM 12/6/2006, Luke Paireepinart wrote: I have a list of names (Names[]) and want to remove duplicate names in the list. [snip] The way I usually do this is something like: outDict = dict(map(lambda x: (x, 1), inList)) names = outDict.keys() names.sort() How about

Re: [Tutor] List manipulation

2006-09-16 Thread Srinivas Iyyer
Dear Kent and Bob, thank you for your solutions. It helped, however, based on your suggestions, I intended to solve a chromosome walking problem. I posted my question on subject name: 'Limitation of range() function in Walking problem'. Thanks again. Sri --- Kent Johnson [EMAIL PROTECTED]

<    1   2   3   4   5   6   7   >