<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 2/26/2013 9:41 AM, Colin Morley
wrote:<br>
</div>
<blockquote cite="mid:001f01ce142f$5039b260$f0ad1720$@demon.co.uk"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">Hi</div>
</blockquote>
I just found your post - and see no reply, so I will reply.<br>
<blockquote cite="mid:001f01ce142f$5039b260$f0ad1720$@demon.co.uk"
type="cite">
<div class="WordSection1"><o:p></o:p><br>
<o:p> </o:p><br>
I’m not a Python expert – barely a novice, but the entry for the
function INT() on both 2.7 and 3.3 versions is headed <o:p></o:p><br>
<o:p> </o:p><br>
INT(x=0)...</div>
</blockquote>
actually it is int(x=0). Python is case sensitive!<br>
<blockquote cite="mid:001f01ce142f$5039b260$f0ad1720$@demon.co.uk"
type="cite">
<div class="WordSection1"><o:p></o:p><br>
<o:p> </o:p><br>
Which does not seem to make much sense to me – shouldn’t it be
INT(x)?<o:p></o:p><br>
<o:p> </o:p><br>
(X=0) is true or false (1 or 0) depending on the value of x.</div>
</blockquote>
actually comparison uses ==. x==0 would yiels True or False. Note
again case is important.<br>
<blockquote cite="mid:001f01ce142f$5039b260$f0ad1720$@demon.co.uk"
type="cite">
<div class="WordSection1"><o:p></o:p><br>
<o:p> </o:p><br>
Apologies if this is nonsense</div>
</blockquote>
Just not clearly understanding.<br>
<br>
When you define a function you can make a parameter optional by the
syntax parameter = default value.<br>
<br>
int(x=0) thus is shorthand for saying "if you don't provide a value
for x it will be assigned the value 0.<br>
<br>
You could have discovered this by reading the docs. "Convert a
number or string x to an integer, or return 0 if no arguments are
given."<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Bob Gailer
919-636-4239
Chapel Hill NC</pre>
</body>
</html>