Skip to content

future.builtins.int: Right hand division by float raises NonImplementedError #38

Closed

Description

@mbyt
# python 3.3
$ python3 -c "print(int(3) / 5)"
0.6
# python 3.3 future
$ python3 -c "import future; from future.builtins import int; print(future.__version__); print(int(3) / 5.)"
0.12.0-dev
0.6
# python 2.7 future
$ python -c "import future; from future.builtins import int; print future.__version__; print int(3) / 5."
0.12.0-dev
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/mbyt/local/python2.7/lib/python2.7/site-packages/future-0.12.0_dev-py2.7.egg/future/builtins/types/newint.py", line 119, in __div__
    return newint(super(newint, self).__div__(other))
  File "/home/mbyt/local/python2.7/lib/python2.7/site-packages/future-0.12.0_dev-py2.7.egg/future/builtins/types/newint.py", line 81, in __new__
    type(val)))
TypeError: newint argument must be a string or a number, not '<type 'NotImplementedType'>'

see also obspy/obspy@08add2e#commitcomment-5643463.

Activity

  1. added a commit that references this issue on Mar 18, 2014
  2. edschofield commented on Mar 18, 2014

    @edschofield
    Contributor

    @mbyt: thanks very much for the bug report. I've pushed a fix to the master branch. This will be available in v0.12 soon.

  3. added 2 commits that reference this issue on Mar 24, 2014
  4. changed the title [-]future.builtins.int: Right hand devision by float raises NonImplementedError[/-] [+]future.builtins.int: Right hand division by float raises NonImplementedError[/+] on Mar 24, 2014
  5. edschofield commented on Mar 24, 2014

    @edschofield
    Contributor

    Fixed in v0.11.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions