Eri*_*rik 3 python numbers python-3.x
我在python 3中实现了一个数字类.我需要做什么
float(mynumber)
Run Code Online (Sandbox Code Playgroud)
工作正常吗?
从文档中,模拟数字类型:
object.__complex__(self)
object.__int__(self)
object.__long__(self)
object.__float__(self)
Called to implement the built-in functions complex(), int(), long(), and float().
Should return a value of the appropriate type.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1305 次 |
| 最近记录: |