We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
函数重载指的是有多个同名的函数,但是它们的签名或实现有不同。
Python 中使用装饰器(例如 functools 库的 singledispatch),可以实现函数重载的效果。
然而,原生 Python 语法层面不支持函数重载。
初步原因:locals 命名空间中不允许出现同名函数
TODO:语言设计时的考虑?相关历史讨论线索?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
函数重载指的是有多个同名的函数,但是它们的签名或实现有不同。
Python 中使用装饰器(例如 functools 库的 singledispatch),可以实现函数重载的效果。
然而,原生 Python 语法层面不支持函数重载。
初步原因:locals 命名空间中不允许出现同名函数
TODO:语言设计时的考虑?相关历史讨论线索?
The text was updated successfully, but these errors were encountered: