<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: VB&#8217;s iif in Python</title>
	<link>http://www.blendedtechnologies.com/vbs-iif-in-python/18</link>
	<description>Established January 2005</description>
	<pubDate>Thu, 28 Aug 2008 22:37:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0</generator>

	<item>
		<title>by: fnl</title>
		<link>http://www.blendedtechnologies.com/vbs-iif-in-python/18#comment-884</link>
		<pubDate>Fri, 18 Aug 2006 14:22:35 +0000</pubDate>
		<guid>http://www.blendedtechnologies.com/vbs-iif-in-python/18#comment-884</guid>
					<description>@mm: wrong!

('heavy coat', 'light coat')[int(is_summer)]

but thanks for the tip...</description>
		<content:encoded><![CDATA[<p>@mm: wrong!</p>
<p>(&#8217;heavy coat&#8217;, &#8216;light coat&#8217;)[int(is_summer)]</p>
<p>but thanks for the tip&#8230;
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: GC</title>
		<link>http://www.blendedtechnologies.com/vbs-iif-in-python/18#comment-33</link>
		<pubDate>Tue, 01 Nov 2005 03:39:14 +0000</pubDate>
		<guid>http://www.blendedtechnologies.com/vbs-iif-in-python/18#comment-33</guid>
					<description>Why don't they just include the C-style ?: expressions?  Everyone can read them, you save the linebreaks for simple expressions, it's win-win!</description>
		<content:encoded><![CDATA[<p>Why don&#8217;t they just include the C-style ?: expressions?  Everyone can read them, you save the linebreaks for simple expressions, it&#8217;s win-win!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: SJB</title>
		<link>http://www.blendedtechnologies.com/vbs-iif-in-python/18#comment-22</link>
		<pubDate>Wed, 21 Sep 2005 17:31:49 +0000</pubDate>
		<guid>http://www.blendedtechnologies.com/vbs-iif-in-python/18#comment-22</guid>
					<description>Please consider readability.  Some code is just one-off that never gets read by another person - like in the interactive python shell.  If you want to save a couple line breaks in such a rare situation, by all means use your method.

However this conditional assignment has been rejected for inclusion in python proper partly because it is so unreadable.

if is_summer:
  furrycoat = 'light coat'
else:
  furrycoat = 'heavy coat'

Is, IMHO, the best way to do it.</description>
		<content:encoded><![CDATA[<p>Please consider readability.  Some code is just one-off that never gets read by another person - like in the interactive python shell.  If you want to save a couple line breaks in such a rare situation, by all means use your method.</p>
<p>However this conditional assignment has been rejected for inclusion in python proper partly because it is so unreadable.</p>
<p>if is_summer:<br />
  furrycoat = &#8216;light coat&#8217;<br />
else:<br />
  furrycoat = &#8216;heavy coat&#8217;</p>
<p>Is, IMHO, the best way to do it.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Administrator</title>
		<link>http://www.blendedtechnologies.com/vbs-iif-in-python/18#comment-20</link>
		<pubDate>Wed, 21 Sep 2005 13:54:01 +0000</pubDate>
		<guid>http://www.blendedtechnologies.com/vbs-iif-in-python/18#comment-20</guid>
					<description>tuple/array-assignment
#int(True)==1,int(False)==0
furrycoat = (’light coat’,'heavy coat’)[int(is_summer)] 

This looks promising.</description>
		<content:encoded><![CDATA[<p>tuple/array-assignment<br />
#int(True)==1,int(False)==0<br />
furrycoat = (’light coat’,&#8217;heavy coat’)[int(is_summer)] </p>
<p>This looks promising.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: mm</title>
		<link>http://www.blendedtechnologies.com/vbs-iif-in-python/18#comment-17</link>
		<pubDate>Wed, 21 Sep 2005 07:12:20 +0000</pubDate>
		<guid>http://www.blendedtechnologies.com/vbs-iif-in-python/18#comment-17</guid>
					<description>just for fun..
tuple/array-assignment 
#int(True)==1,int(False)==0

furrycoat = ('light coat','heavy coat')[int(is_summer)]</description>
		<content:encoded><![CDATA[<p>just for fun..<br />
tuple/array-assignment<br />
#int(True)==1,int(False)==0</p>
<p>furrycoat = (&#8217;light coat&#8217;,'heavy coat&#8217;)[int(is_summer)]
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
