ipython / ipython/traitlets

Add CInteger trait type

Đang mở
#243 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
653
Fork
217
Merge trung bình
2 ngày 21 giờ
Pull request đã merge (30 ngày)
2

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.