<br><br><div class="gmail_quote">On Thu, Feb 10, 2011 at 3:31 AM, Benjamin Kaplan <span dir="ltr"><<a href="mailto:benjamin.kaplan@case.edu">benjamin.kaplan@case.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5"><br>
> On Wed, Feb 9, 2011 at 5:34 PM, MRAB <<a href="mailto:python@mrabarnett.plus.com">python@mrabarnett.plus.com</a>> wrote:<br>
<br>
>>> Or typecast to an int if you want to neglect decimals before converting<br>
>>> to a string, etc.<br>
>>><br>
>> [snip]<br>
>> Python doesn't have typecasting. :-)<br>
><br>
> Because these basic types are not mutable?  <excuse> Most of my work has to<br>
> be in Fortran, so I'm a relative newcomer to Python.  When I don't need<br>
> Fortran-y performance it's much nicer (obviously to anyone that's used them<br>
> both)!  Still don't know much deeper than Python's cosmetic surface at this<br>
> point. </excuse><br>
><br>
<br>
</div></div>Not exactly. It's because everything in Python is an object. What<br>
you're doing isn't type casting. It's just calling an object<br>
constructor- no different than any other class in the language.<br></blockquote><div><br>Ah, makes sense, thanks.  Most of what I see/work in is C and Fortran -- not much OOP there :)<br><br>--Jason<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div><div></div><div class="h5">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Jason M. Swails<br>Quantum Theory Project,<br>University of Florida<br>Ph.D. Graduate Student<br>352-392-4032<br>