<html>
<body>
At 07:35 AM 8/13/2007, Robert Dailey wrote:<br>
<blockquote type=cite class=cite cite="">Just curious Dick, why are you
making your own to_base method? Doesn't the source I provided in my
earlier email give you all that you need? I was hoping my source might be
useful to a few people, even though it's pretty trivial code.
</blockquote><br>
I didn't roll my own. I just preferred "n" to
"number". I greatly appreciated your code!<br><br>
Dick<br><br>
<br>
<blockquote type=cite class=cite cite="">On 8/12/07, <b>Dick Moores</b>
<<a href="mailto:rdm@rcblue.com">rdm@rcblue.com</a>> wrote:<br>
<dl>
<dd>At 07:04 PM 8/12/2007, Michael Bentley wrote:<br><br>
<dd>>On Aug 12, 2007, at 6:28 PM, Dick Moores wrote:<br>
<dd>><br>
<dd>>>n = 12<br>
<dd>>>base = 36<br>
<dd>>>print to_base(n, base)<br>
<dd>>>========================================== <br>
<dd>>>This seems to work fine for n >= base, but not for n <
base. For<br>
<dd>>>example, the code shown returns "c". Is my
indentation wrong, or<br>
<dd>>>the code? It seems to me that the code should work for the
general <br>
<dd>>>case, not just for n >= base.<br>
<dd>><br>
<dd>>Isn't 'c' the correct answer?<br><br>
<dd>Yes, of course. Stupid of me.<br><br>
<dd>Dick<br><br>
<br>
<dd>--<br>
<dd><a href="http://mail.python.org/mailman/listinfo/python-list">
http://mail.python.org/mailman/listinfo/python-list</a><br><br>
</dl></blockquote></body>
</html>