Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Convert '165.0' to int
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Billy Mays, post: 4231382"] I am aware the premature optimization is a danger, but its also incorrect to ignore potential performance pitfalls. I would favor a generator expression here, if only because I think its easier to read. In addition, it properly handles large amounts of data by not duplicating the list. For very long input sequences, genexp would be the proper thing to do (assuming you don't need to index into results, in which case, its wrong.) I think the fastest way to solve the OP's problem is the following: ;) def convert_165_0_to_int(arg): return 165 [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Convert '165.0' to int
Top