为什么 Method#arity 被称为 arity?
在 Ruby 中,我知道 Method#arity
将返回一个表示方法接受的参数数量的值,但我不知道为什么它被称为 arity。 任何人都可以深入了解为什么它会存在于如此看似随机的命名空间中吗? 另外,你怎么发音?
In Ruby, I know that Method#arity
will return a value representing the number of arguments accepted by a method, however I do not know why it is called arity. Can anyone provide some insight into why it would exist in such a seemingly random namespace? Also, how do you pronounce it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因为这实际上就是它的名字。 http://en.wikipedia.org/wiki/Arity
我发音为 AIR-i-TEE就像极性一样。
Because that's actually the name for it. http://en.wikipedia.org/wiki/Arity
I pronounce it AIR-i-TEE like in polarity.