add Integer traitlet #996

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@minrk
Member
minrk commented Nov 13, 2011

Most Int traits are now Integers

Integer differs from Long only in that small longs are cast to int, rather than
all ints being cast to long:

Integer(4L) => 4
Long(4) => 4L

closes gh-942

@minrk minrk add Integer traitlet
Most int traits are now Integers

Integer differs from Long only in that small `long`s are cast to `int`, rather than
all `int`s being cast to `long`:

    Integer(4L) => 4
    Long(4) => 4L

closes gh-942
cfee6c0
@takluyver
Member

Looks OK to me. I haven't tested in Python 3, but from what I know 2to3 does, it should work (it just becomes effectively the same as Int).

@minrk
Member
minrk commented Nov 14, 2011

The Integer traitlet is defined inside the same if not py3compat.PY3 block as Long, so Int is Integer on Python 3.

@takluyver
Member

Oh yes, I'd missed that.

@fperez fperez closed this Nov 20, 2011
@fperez
Member
fperez commented Nov 20, 2011

Looks good. Rebased and merged in 293d3ee. Thanks!

@stefanv stefanv pushed a commit to stefanv/ipython that referenced this pull request Nov 30, 2011
@minrk minrk add Integer traitlet
Most int traits are now Integers

Integer differs from Long only in that small `long`s are cast to `int`, rather than
all `int`s being cast to `long`:

    Integer(4L) => 4
    Long(4) => 4L

closes gh-942, closes gh-996.

Rebased to avoid recursive merge for just one commit.
293d3ee
@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
@minrk minrk add Integer traitlet
Most int traits are now Integers

Integer differs from Long only in that small `long`s are cast to `int`, rather than
all `int`s being cast to `long`:

    Integer(4L) => 4
    Long(4) => 4L

closes gh-942, closes gh-996.

Rebased to avoid recursive merge for just one commit.
5a9b3b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment