ipython / ipython/traitlets

Add CInteger trait type

Open
#243 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
653
Forks
217
Avg merge
2d 21h
Merged PRs (30d)
2

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.