在IronPython的,我可以做的:
In IronPython I can do:
Console.WriteLine(int.MaxValue)
其中的 INT 的是不是一个变量,而是System.Int32的。我得到的:
where int is not a variable but rather System.Int32. I get back:
Max of int: 2137483647
不过,如果我尝试类似的东西的双的(System.Double),我得到:
Yet if I try something similar for double (System.Double), I get:
NameError: name 'double' is not defined.
类似地进行的字符的(System.Char)。怎么会呢?
Similary for char (System.Char). How come?
请参阅 Python的内置类型和.NET类型之间的映射
INT
是不是一个关键字,它是一个内置式的Python和IronPython的实现它使用 System.Int32的
。同样浮动
使用实施 System.Double
。
int
is not a keyword, it is a builtin type in Python, and IronPython implements it using System.Int32
. Similarly float
is implemented using System.Double
.
双
和字符
不是内建类型Python编写的。
double
and char
are not builtin types in Python.