Skip to content

Feature/7 interval initialization#8

Open
adarshk7 wants to merge 7 commits intokvesteri:masterfrom
adarshk7:feature/7-interval-initialization
Open

Feature/7 interval initialization#8
adarshk7 wants to merge 7 commits intokvesteri:masterfrom
adarshk7:feature/7-interval-initialization

Conversation

@adarshk7
Copy link
Copy Markdown
Contributor

@adarshk7 adarshk7 commented Feb 9, 2014

Add support for interval initialization.

eg.
IntInterval(2, 5) == IntInterval((2, 5))
and
IntInterval[2, 5] == IntInterval([2, 5])

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not work on Python 3.3. See http://pythonhosted.org/six/#six.with_metaclass

@kvesteri
Copy link
Copy Markdown
Owner

The Interval class constructor needs to be changed so that it supports also the following scenarios:

IntInterval(2, 5, inc_upper=True) == IntInterval('(2, 5]']
IntInterval(2, 5, inc_lower=True) == IntInterval('[2, 5)']
IntInterval(2, 5, inc_lower=True, inc_upper=True) == IntInterval[2, 5]

@kvesteri kvesteri force-pushed the master branch 2 times, most recently from d5ac267 to e7512e2 Compare October 21, 2014 12:14
@kvesteri kvesteri force-pushed the master branch 4 times, most recently from 216a7b5 to 6cf3218 Compare February 27, 2016 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants