Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-18 Thread Dave Angel
On 03/17/2013 10:14 PM, Yves S. Garret wrote: I don't get why it's posting what I said twice... Because you're using googlegroups, and haven't unchecked some poorly defined default setting. You're posting both to python-list and to comp.lang.python, each of which is mirrored to the other.

[Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Yves S. Garret
N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run and then the list is assigned to the tricky variable. But, what happens in the second example? Does the loop after in get run only once or multiple number of times? --

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Andrew Berg
On 2013.03.17 19:58, Yves S. Garret wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run and then the list is assigned to the tricky variable. But, what happens in the second example? Does the loop after in

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Gary Herron
On 03/17/2013 05:58 PM, Yves S. Garret wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run and then the list is assigned to the tricky variable. But, what happens in the second example? Does the loop after in get

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Roy Smith
In article 485a3093-8c07-4d1a-b49e-af32f84f8...@googlegroups.com, Yves S. Garret yoursurrogate...@gmail.com wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run and then the list is assigned to the tricky

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Yves S. Garret
On Sunday, March 17, 2013 9:18:12 PM UTC-4, Gary Herron wrote: On 03/17/2013 05:58 PM, Yves S. Garret wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run and then the list is assigned to the

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Yves S. Garret
On Sunday, March 17, 2013 9:28:56 PM UTC-4, Roy Smith wrote: In article 485a3093...@googlegroups.com, Yves S. Garret your...@gmail.com wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Yves S. Garret
I don't get why it's posting what I said twice... -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Roy Smith
In article 7f3b4dde-fbd7-44ca-96bc-31a6b2894...@googlegroups.com, Yves S. Garret yoursurrogate...@gmail.com wrote: I'm trying to better understand what's going on behind the scenes and I appreciate your thorough input. What I don't understand is, how would you avoid creating L1? Leave out

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Roy Smith
In article mailman.3405.1363573404.2939.python-l...@python.org, Yves S. Garret yoursurrogate...@gmail.com wrote: I don't get why it's posting what I said twice... Because you're posting using the Google Groups web interface, right? Google Groups is just plain busted and double-posts

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Steven D'Aprano
On Sun, 17 Mar 2013 19:14:49 -0700, Yves S. Garret wrote: I don't get why it's posting what I said twice... Because you are emailing to the list, and CCing the list. In your email, you have: To: comp.lang.pyt...@googlegroups.com Cc: python-list@python.org Unfortunately, they are the same

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Roy Smith
In article 51467f6f$0$6599$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: there are at least three ways to post to this group: 1) Email to python-list@python.org 2) Post to the news group comp.lang.python on Usenet 3) Email to

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Terry Reedy
On 3/17/2013 8:58 PM, Yves S. Garret wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 Short code like this should be included in your message. tricky = sorted([w for w in set(text2) if 'cie' in w or 'cei' in w]) for word in tricky: print word, for word in