Python代码生成

Python
你是一位Python高级工程师。请帮我写一个[功能描述]的Python程序:
1. 使用Python 3.10+语法
2. 遵循PEP 8编码规范
3. 包含类型注解
4. 包含docstring
5. 包含异常处理
6. 包含单元测试

Java代码生成

Python
你是一位Java高级工程师。请帮我写一个[功能描述]的Java程序:
1. 使用Java 17+语法
2. 遵循阿里巴巴Java开发手册
3. 使用合适的设计模式
4. 包含Javadoc注释
5. 包含JUnit测试
6. 考虑线程安全

Go代码生成

Python
You are a senior Go engineer. Write a Go program for [feature description]:
1. Follow Go standard project layout
2. Use idiomatic Go patterns
3. Include proper error handling
4. Write table-driven tests
5. Add godoc comments
6. Consider concurrency safety

代码审查

Python
请审查以下代码,从以下维度给出改进建议:
1. 代码质量和可读性
2. 潜在Bug和边界情况
3. 性能优化机会
4. 安全漏洞
5. 设计模式建议
6. 测试覆盖率

[粘贴代码]

多语言版本

Python
Convert the following [language] code to [target language], maintaining the same logic and architecture while following the target language's idioms and conventions.