IronPython的:双关键字无法识别? [英] IronPython: double keyword not recognised?
问题描述
在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?
推荐答案
请参阅<一href="http://ironpython.net/documentation/dotnet/dotnet.html#mapping-between-python-builtin-types-and-net-types"相对=nofollow> 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.
这篇关于IronPython的:双关键字无法识别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!