← index #5692PR #4771
Related · high · value 1.397
QUERY · ISSUE

Add pop() in bytearray

openby JK-deopened 2020-02-24updated 2024-10-01
enhancementpy-core

Request implementation of method pop() in type bytearray as implemented in CPython - like in type list.

CANDIDATE · PULL REQUEST

py/objarray: Add decode method to bytearray.

closedby stinosopened 2019-05-09updated 2019-05-21

Reuse the implementation for bytes since it's exactly the same.

Also found this when working with msgpack where it gets used to get strings instead of bytes, which is too convenient not to use it (e.g. msgpack.unpackb(msgpack.packb('a')) returns b'a' without it). I don' think there is an easy way around here (like dynamically adding a method to a builtin type)?

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied