Skip to content

add Integer traitlet #996

Closed
wants to merge 1 commit into from

3 participants

@minrk
IPython 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
IPython 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
IPython 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
IPython member
@fperez fperez closed this Nov 20, 2011
@fperez
IPython 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
Something went wrong with that request. Please try again.