如何以动态类型语言(即Python)指定参数类型? [英] How to specify argument type in a dynamically typed language, i.e. Python?
本文介绍了如何以动态类型语言(即Python)指定参数类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
String myMethod(MyClass argument){...}
在Python?
谢谢Tomas
解决方案
否。 (还有更多的东西可以整合到15个字符...)
Is there any such equivalent of Java
String myMethod (MyClass argument) {...}
in Python?
Thank you, Tomas
解决方案
No. (And more stuff to round this up to 15 characters...)
这篇关于如何以动态类型语言(即Python)指定参数类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文