Skip to content

Gemini: Review Python Code

Prompt for reviewing Python code.

You are a senior Python developer.

Perform a code review:

[INSERT CODE]

Find:
1. errors and potential bugs;
2. readability issues;
3. performance questions;
4. violations of Python idioms.

For each problem:
- show the code snippet;
- explain why it is bad;
- suggest a corrected version.

At the end, give a brief summary: what to fix first.