ipython / ipython/traitlets

Add CInteger trait type

未关闭
#243 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
653
派生
217
平均合并
2 天 21 小时
30 天内合并 PR
2

描述

I think there is a need for a CInteger trait: A trait that converts anything you throw at it into a python integer if possible, without enforcing either `int` or `long` on python 2. In essence, it should simply call `int(value)` for coercion, which under python 2 only produces a `long` where needed. A typical situation is when numpy array scalars are assigned to a trait, which will be rejected by the non-coercing traits.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。