How can I make a bug report for a small Python function reproducible?
Quick answer
Include the exact function call and inputs, what you expected, what happened instead, and the complete relevant traceback. Reduce the code and data to the smallest example that still shows the problem, then check that it runs as written in a fresh Python session. State your Python version if you know it, and remove unrelated code or private data.
The question, the details, the next step.
A practical checklist
Show the smallest function and imports that still demonstrate the issue.
Include the exact call and concrete input values.
Describe expected and actual behavior separately.
Paste the relevant complete traceback, or state that no exception occurred.
Add the Python version and essential setup if known.
Rerun the example as written and replace private values with placeholders.
A few more useful answers
Should I include the entire program?
Usually not. Include only the code and setup needed to reproduce the function-level problem; explain if you cannot yet reduce it further.
What if I don't know my Python version?
Don't guess. Leave it as unknown or say you haven't checked; include it later if you can find it.
Do I need a traceback for every bug report?
No. Include one when an exception occurs. For an unexpected return value or behavior, report the exact call and what happened instead.
