Discussion Overview
The discussion revolves around extracting object and method names from the method_calls attribute of Python's unittest.mock module. Participants explore the structure of call objects, their hierarchy, and how to manipulate them to retrieve specific names.
Discussion Character
- Exploratory
- Technical explanation
- Conceptual clarification
- Debate/contested
Main Points Raised
- One participant presents an example of method_calls and asks how to extract names like 'thing', 'pop', 'bob', and 'smash'.
- Another participant references the Python documentation, suggesting it may provide helpful insights for extracting names.
- A participant expresses confusion about the behavior of method_calls, noting that accessing elements does not yield expected results, and attributes this to the structure of call objects.
- One participant proposes a philosophical interpretation of the functionality, questioning the nature of the call object and its hierarchy in relation to multiple mocks.
- Another participant echoes the inquiry about the call object, emphasizing the need for experimentation to clarify its behavior across different mocks.
- There is a question about whether the names can be treated as strings that can be split using the .split(".") method, with a later reply confirming this possibility.
Areas of Agreement / Disagreement
Participants express varying levels of understanding and curiosity about the functionality of call objects and method_calls. There is no consensus on the philosophical implications or the nature of the call object, and some questions remain unresolved.
Contextual Notes
Participants highlight the complexity of the call object structure and its behavior, indicating that assumptions about its properties may not hold universally across different mock instances.