Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Byte Question
#1
Isn't b'\xec' the same as 0xEC?

I have bytes like 0xEC as keys for a dict, but I keep getting a key error traceback with some code saying that b'\xec' doesn't exist (I assume--it's a KeyError) when there is a key named 0xEC.

I'm confused...
Reply


Messages In This Thread
Simple Byte Question - by malonn - Aug-26-2018, 06:35 PM
RE: Simple Byte Question - by buran - Aug-26-2018, 06:42 PM
RE: Simple Byte Question - by malonn - Aug-26-2018, 07:50 PM
RE: Simple Byte Question - by malonn - Aug-29-2018, 12:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Very Beginner question on simple variables Harvy 1 231 Apr-12-2024, 12:03 AM
Last Post: deanhystad
  Simple Question - ' defined as "a". ?' Ryan012 10 1,706 May-27-2023, 06:03 PM
Last Post: Ryan012
  Very simple question about filenames and backslashes! garynewport 4 2,026 Jan-17-2023, 05:02 AM
Last Post: deanhystad
  Python Tkinter Simple Multithreading Question AaronCatolico1 5 1,646 Dec-14-2022, 11:35 PM
Last Post: deanhystad
  A simple "If...Else" question from a beginner Serena2022 6 1,788 Jul-11-2022, 05:59 AM
Last Post: Serena2022
  Simple arithmetic question ebolisa 5 2,122 Dec-15-2021, 04:56 PM
Last Post: deanhystad
  Simple code question about lambda and tuples JasPyt 7 3,406 Oct-04-2021, 05:18 PM
Last Post: snippsat
Big Grin question about simple algorithm to my problem jamie_01 1 1,710 Oct-04-2021, 11:55 AM
Last Post: deanhystad
  Simple question 1234 4 2,323 Dec-04-2020, 12:29 PM
Last Post: DeaD_EyE
  'utf-8' codec can't decode byte 0xe2 in position 122031: invalid continuation byte tienttt 12 11,676 Sep-18-2020, 10:10 PM
Last Post: tienttt

Forum Jump:

User Panel Messages

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