<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Sat May 25, 2013 7:06 am by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Sat May 25, 2013 7:06 am</pubDate>
  <lastBuildDate>Sat May 25, 2013 7:06 am</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>Re: Python beginner</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=89273#89273</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=2375'&gt;JPGargoyle&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun May 16, 2010 7:14 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;LeeNukes wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;&lt;br /&gt;
This was someone elses code I was trying to get to work. I sorted it in the end, but I had to mess with the indents,&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Ah, that's the major point on python's indenting: posting code online, copy-pasting it, leaving to situations where white-spacing and formatting is lost. But that's no reason to change one of the (IMHO) best features of python.&lt;br /&gt;
&lt;br /&gt;
Best regards</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=89273#89273</comments>
                                        <author>JPGargoyle</author>
                                        <pubDate>Sun May 16, 2010 7:14 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=89273#89273</guid>
                                      </item>
                                      <item>
                                        <title>Re: Python beginner</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=89272#89272</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=64947'&gt;LeeNukes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun May 16, 2010 7:04 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;JPGargoyle wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;LeeNukes wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;&lt;br /&gt;
at least braces are visible though. Trying to work out which indent needs to line up with which isn't straight forward.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
How can you say that?&lt;br /&gt;
&lt;br /&gt;
If you don't know what must be lined up, then you don't know what you are programming.&lt;br /&gt;
If you are writing a python (or any other) program, it's you who know it's logical structure, so for example you should know all the code that must be executed inside an if statement for your program to work. If that block of code must be inside braces, or equally indented, it's exactly the same.&lt;br /&gt;
&lt;br /&gt;
Best regards&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
This was someone elses code I was trying to get to work. I sorted it in the end, but I had to mess with the indents,</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=89272#89272</comments>
                                        <author>LeeNukes</author>
                                        <pubDate>Sun May 16, 2010 7:04 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=89272#89272</guid>
                                      </item>
                                      <item>
                                        <title>Re: Python beginner</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=89271#89271</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=2375'&gt;JPGargoyle&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun May 16, 2010 6:50 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;LeeNukes wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;&lt;br /&gt;
at least braces are visible though. Trying to work out which indent needs to line up with which isn't straight forward.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
How can you say that?&lt;br /&gt;
&lt;br /&gt;
If you don't know what must be lined up, then you don't know what you are programming.&lt;br /&gt;
If you are writing a python (or any other) program, it's you who know it's logical structure, so for example you should know all the code that must be executed inside an if statement for your program to work. If that block of code must be inside braces, or equally indented, it's exactly the same.&lt;br /&gt;
&lt;br /&gt;
Best regards</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=89271#89271</comments>
                                        <author>JPGargoyle</author>
                                        <pubDate>Sun May 16, 2010 6:50 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=89271#89271</guid>
                                      </item>
                                      <item>
                                        <title>Re: Python beginner</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=89270#89270</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=64947'&gt;LeeNukes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun May 16, 2010 6:39 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;nelz wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;LeeNukes wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;While on the theme of Python, why are indents such an issue? I used to think they were just to make it easy for people to read, but it stops a program working if they are slightly wrong.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Because indentation is part of the syntax, it does the job of braces in most other languages. You'd expect a syntax error from a missing brace in them, you get the same from a missing tab in Python, for exactly the same reasons.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
at least braces are visible though. Trying to work out which indent needs to line up with which isn't straight forward.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=89270#89270</comments>
                                        <author>LeeNukes</author>
                                        <pubDate>Sun May 16, 2010 6:39 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=89270#89270</guid>
                                      </item>
                                      <item>
                                        <title>Re: Python beginner</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=89266#89266</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=21509'&gt;cbuffer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun May 16, 2010 5:18 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;graemef wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;The &lt;span style=&quot;font-weight: bold&quot;&gt;L&lt;/span&gt; indicates that the data type is a &lt;span style=&quot;font-weight: bold&quot;&gt;L&lt;/span&gt;ong integer. The second version which prints the value converts the numeric to a character string and the data type is not shown.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Thank you graemef,  I really should have worked that out for myself.&lt;br /&gt;
&lt;br /&gt;
Ken</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=89266#89266</comments>
                                        <author>cbuffer</author>
                                        <pubDate>Sun May 16, 2010 5:18 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=89266#89266</guid>
                                      </item>
                                      <item>
                                        <title>Re: Python beginner</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=89261#89261</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=5'&gt;nelz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun May 16, 2010 12:39 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;LeeNukes wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;While on the theme of Python, why are indents such an issue? I used to think they were just to make it easy for people to read, but it stops a program working if they are slightly wrong.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Because indentation is part of the syntax, it does the job of braces in most other languages. You'd expect a syntax error from a missing brace in them, you get the same from a missing tab in Python, for exactly the same reasons.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=89261#89261</comments>
                                        <author>nelz</author>
                                        <pubDate>Sun May 16, 2010 12:39 pm</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=89261#89261</guid>
                                      </item>
                                      <item>
                                        <title>Re: Python beginner</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=89254#89254</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=2326'&gt;ollie&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun May 16, 2010 11:15 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Dive into Python wrote:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;quote&quot;&gt;Python functions have no explicit begin or end, and no curly braces to mark where the function code starts and stops. The only delimiter is a colon (&lt;img src=&quot;images/smiles/icon_smile.gif&quot; alt=&quot;Smile&quot; border=&quot;0&quot; /&gt; and the indentation of the code itself.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Ref: &lt;a href=&quot;http://book.opensourceproject.org.cn/lamp/python/diveintopython/index.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;http://book.opensourceproject.org.cn/lamp/python/diveintopython/index.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Indenting is a structural requirement of Python syntax.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=89254#89254</comments>
                                        <author>ollie</author>
                                        <pubDate>Sun May 16, 2010 11:15 am</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=89254#89254</guid>
                                      </item>
                                      <item>
                                        <title>Re: Python beginner</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=89248#89248</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=64947'&gt;LeeNukes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun May 16, 2010 9:15 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      While on the theme of Python, why are indents such an issue? I used to think they were just to make it easy for people to read, but it stops a program working if they are slightly wrong.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=89248#89248</comments>
                                        <author>LeeNukes</author>
                                        <pubDate>Sun May 16, 2010 9:15 am</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=89248#89248</guid>
                                      </item>
                                      <item>
                                        <title>Re: Python beginner</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=89243#89243</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=66407'&gt;graemef&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun May 16, 2010 3:32 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      The &lt;span style=&quot;font-weight: bold&quot;&gt;L&lt;/span&gt; indicates that the data type is a &lt;span style=&quot;font-weight: bold&quot;&gt;L&lt;/span&gt;ong integer. The second version which prints the value converts the numeric to a character string and the data type is not shown.</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=89243#89243</comments>
                                        <author>graemef</author>
                                        <pubDate>Sun May 16, 2010 3:32 am</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=89243#89243</guid>
                                      </item>
                                      <item>
                                        <title>Python beginner</title>
                                        <link>http://linuxformat.com/forums/viewtopic.php?p=89239#89239</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=21509'&gt;cbuffer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sun May 16, 2010 12:47 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Can someone point me to an explanation of the significance of the L in line 2 please?&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; pow(2,31)&lt;br /&gt;
2147483648L&lt;br /&gt;
&amp;gt;&amp;gt;&amp;gt; print pow(2,31)&lt;br /&gt;
2147483648&lt;br /&gt;
&lt;br /&gt;
TIA&lt;br /&gt;
&lt;br /&gt;
Ken</description>
                                        <comments>http://linuxformat.com/forums/viewtopic.php?p=89239#89239</comments>
                                        <author>cbuffer</author>
                                        <pubDate>Sun May 16, 2010 12:47 am</pubDate>
                                        <guid isPermaLink="true">http://linuxformat.com/forums/viewtopic.php?p=89239#89239</guid>
                                      </item></channel></rss>