From 8cf91542189211b4fd14ade236df7e5a452b34f3 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Tue, 7 Nov 2023 21:22:36 -0600 Subject: [PATCH] Add normal `bytes` doc to the bytes override --- overrides.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/overrides.py b/overrides.py index 284525d..b6f066f 100644 --- a/overrides.py +++ b/overrides.py @@ -6,7 +6,20 @@ _T = TypeVar("_T") class bytes(bbytes): - """Local override of builtin bytes class to add "lazy_decode" """ + """Local override of builtin bytes class to add "lazy_decode" + +bytes(iterable_of_ints) -> bytes +bytes(string, encoding[, errors]) -> bytes +bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer +bytes(int) -> bytes object of size given by the parameter initialized with null bytes +bytes() -> empty bytes object + +Construct an immutable array of bytes from: + - an iterable yielding integers in range(256) + - a text string encoded using the specified encoding + - any object implementing the buffer API. + - an integer + """ def __new__( cls: Type[_T],