From dac5da59c078af7c0884382479b20159f05da79e Mon Sep 17 00:00:00 2001 From: David Peter Date: Thu, 20 Feb 2025 10:22:20 +0100 Subject: [PATCH] Add reference to 'Functions and methods' section in the descriptor guide --- .../red_knot_python_semantic/resources/mdtest/call/methods.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/red_knot_python_semantic/resources/mdtest/call/methods.md b/crates/red_knot_python_semantic/resources/mdtest/call/methods.md index 8750030498..cab27ceb7e 100644 --- a/crates/red_knot_python_semantic/resources/mdtest/call/methods.md +++ b/crates/red_knot_python_semantic/resources/mdtest/call/methods.md @@ -2,6 +2,8 @@ ## Background: Functions as descriptors +> Note: See also this related section in the descriptor guide: [Functions and methods]. + Say we have a simple class `C` with a function definition `f` inside its body: ```py @@ -244,3 +246,5 @@ method_wrapper() # error: [too-many-positional-arguments] "Too many positional arguments: expected 2, got 3" method_wrapper(C(), C, "one too many") ``` + +[functions and methods]: https://docs.python.org/3/howto/descriptor.html#functions-and-methods