Advanced
Comprehensive Code Review
Analyze code for bugs, security issues, and suggest refactoring for readability.
📝 Contenu du Prompt
Perform a comprehensive line-by-line analysis of the following Python function: def calc(a,b): return a/b. Identify potential security vulnerabilities (such as division by zero), performance bottlenecks, and violations of PEP-8 standards. Then, provide a refactored version of the function that addresses all issues, including type hinting and docstrings explaining the changes made.