Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
general conversion to int
#4
some things can only be converted to int by a call like int(thing), such as a float object. other things can only be converted to int by a call like int(thing,0), such as a string that has an unknown base specified in the prefix of the string such as '0xff' or '0o377' or '0b11111111' or just '255'. float does not work in int(thing,0) and most of those strings don't work in int(thing).
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
general conversion to int - by Skaperen - Aug-08-2018, 02:30 AM
RE: general conversion to int - by Vysero - Aug-08-2018, 04:33 PM
RE: general conversion to int - by DeaD_EyE - Aug-08-2018, 06:10 PM
RE: general conversion to int - by Skaperen - Aug-09-2018, 12:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  General query regarding conversion of dict to class object saisankalpj 0 1,925 Jan-16-2019, 01:58 PM
Last Post: saisankalpj

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020