Python Forum
format spec %b is documented but does not work
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
format spec %b is documented but does not work
#1
the format spec %b is documented but does not work:

Output:
lt1/forums /home/forums 1> py2 Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> '%x'%15 'f' >>> '%o'%15 '17' >>> '%b'%15 Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: unsupported format character 'b' (0x62) at index 1 >>> lt1/forums /home/forums 2> py3 Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> '%x'%15 'f' >>> '%o'%15 '17' >>> '%b'%15 Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: unsupported format character 'b' (0x62) at index 1 >>> lt1/forums /home/forums 3>
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
format spec %b is documented but does not work - by Skaperen - Jul-26-2017, 02:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  issubclass() not as documented Skaperen 19 8,090 Mar-15-2021, 04:58 PM
Last Post: nilamo
  where is this documented? Skaperen 8 4,734 Feb-20-2018, 03:31 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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