stdlib: Add several missing __(deep)copy__ methods (#7242)

This commit is contained in:
Alex Waygood
2022-02-17 02:57:41 +00:00
committed by GitHub
parent d869f2e5a3
commit 1091521f60
7 changed files with 26 additions and 2 deletions

View File

@@ -85,9 +85,12 @@ class Element(MutableSequence[Element]):
def iterfind(self, path: str, namespaces: dict[str, str] | None = ...) -> Generator[Element, None, None]: ...
def itertext(self) -> Generator[str, None, None]: ...
def keys(self) -> KeysView[str]: ...
# makeelement returns the type of self in Python impl, but not in C impl
def makeelement(self, __tag: str, __attrib: dict[str, str]) -> Element: ...
def remove(self, __subelement: Element) -> None: ...
def set(self, __key: str, __value: str) -> None: ...
def __copy__(self) -> Element: ... # returns the type of self in Python impl, but not in C impl
def __deepcopy__(self, __memo: Any) -> Element: ... # Only exists in C impl
def __delitem__(self, __i: SupportsIndex | slice) -> None: ...
@overload
def __getitem__(self, __i: SupportsIndex) -> Element: ...