Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
integer bases
#1
when a sequence of digits is prefixed with "0x" in many contexts, one of them being the int() function in python with "0" as argument 2, it means the digits that follow are base 16 (hexadecimal).  likewise, a prefix of "0o" can mean octal, in many contexts, though not as many.  and the prefix of just "0" will also mean octal, but only in python2 when using a base of 0 in int().  and then there is "0b" for binary.

what i am wondering is, if any of you have seen other prefixes like this for other bases such as duotridecimal (32).  i'm not limiting this to just python that you have seen it in, though it is for a python project.
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
integer bases - by Skaperen - Nov-22-2017, 05:30 AM
RE: integer bases - by heiner55 - Nov-22-2017, 07:10 AM
RE: integer bases - by Skaperen - Nov-22-2017, 09:00 AM
RE: integer bases - by heiner55 - Nov-22-2017, 09:48 AM
RE: integer bases - by Skaperen - Nov-23-2017, 03:21 AM
RE: integer bases - by heiner55 - Nov-23-2017, 06:21 AM
RE: integer bases - by Skaperen - Nov-24-2017, 02:02 AM
RE: integer bases - by heiner55 - Nov-24-2017, 09:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  About integer objects vs integer values Nwb 18 7,870 Apr-29-2019, 07:41 PM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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