> For the complete documentation index, see [llms.txt](https://jarvisma.gitbook.io/pythonlearn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jarvisma.gitbook.io/pythonlearn/5.2-wo-yan-zhong-de-python/chapter5.2.3.md). Agents can also search and read this documentation through its [MCP server](https://jarvisma.gitbook.io/pythonlearn/~gitbook/mcp).

# 5.2.3 对新人不是很友好

开发效率高的背后也有隐患，简洁高效的语法可能意味着过度封装，因此 Python 的性能经常遭到抨击（但是脚本语言并不应该考虑这一点）。

鸭子类型容易带来太多的魔术方法。在 Java 中，一切都有迹可循，某个类能调用方法，一定是因为它自己实现了方法，或者从接口、父类那里继承来了。而 Python 不一样，方法的调用和方法的真正实现之间也许没有语言层面的直接关联，而是依靠文档规范、魔术方法或者约定。这给新手阅读 Python 代码带来了极大的困难，通常无从下手，连搜索什么关键字都不知道，这也是本文写作的目的之一。

元编程能力允许用户直接享受到大牛们封装好的库和能力，但也容易被滥用。元编程学习门槛高，而且通常实现一个需求有不止一种方法。如果大家各自造轮子，很可能质量参差不齐，互相理解起来也比较困难。
