Easy function, please help.
Jason Swails
jason.swails at gmail.com
Thu Feb 10 09:50:18 EST 2011
More information about the Python-list mailing list
Thu Feb 10 09:50:18 EST 2011
- Previous message (by thread): Easy function, please help.
- Next message (by thread): Easy function, please help.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Feb 10, 2011 at 3:31 AM, Benjamin Kaplan <benjamin.kaplan at case.edu>wrote: > > > On Wed, Feb 9, 2011 at 5:34 PM, MRAB <python at mrabarnett.plus.com> wrote: > > >>> Or typecast to an int if you want to neglect decimals before converting > >>> to a string, etc. > >>> > >> [snip] > >> Python doesn't have typecasting. :-) > > > > Because these basic types are not mutable? <excuse> Most of my work has > to > > be in Fortran, so I'm a relative newcomer to Python. When I don't need > > Fortran-y performance it's much nicer (obviously to anyone that's used > them > > both)! Still don't know much deeper than Python's cosmetic surface at > this > > point. </excuse> > > > > Not exactly. It's because everything in Python is an object. What > you're doing isn't type casting. It's just calling an object > constructor- no different than any other class in the language. > Ah, makes sense, thanks. Most of what I see/work in is C and Fortran -- not much OOP there :) --Jason -- > http://mail.python.org/mailman/listinfo/python-list > -- Jason M. Swails Quantum Theory Project, University of Florida Ph.D. Graduate Student 352-392-4032 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20110210/f395cd88/attachment-0001.html>
- Previous message (by thread): Easy function, please help.
- Next message (by thread): Easy function, please help.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list