Skip to main content

Uncountable Infinite Set

Project description

How to have a set containing all numbers from 1 to 10 not including 10?
How to add interval from 20 to 30 to that set?
How to make sure this set is a subset of set of positive numbers?
How to add scalar number to it?
How to invert that set?
>>> from uiset import Interval, UISet
>>> s = UISet('[1, 10)')
>>> 1 in s
True
>>> 10 in s
False
>>> s.add(Interval('[20, 30]'))
>>> 25 in s
True
>>> s <= UISet('(0, inf)')
True
>>> s.add(100)
>>> s.notation
'[1, 10), [20, 30], {100}'
>>> (~s).notation
'(-inf, 1), [10, 20), (30, 100), (100, inf)'

uiset provides classes representing math concepts:

  • Infinity
  • Endpoint
  • Interval
  • Uncountable Infinite Set

Besides numbers, uiset supports all objects that can be compared to each other - strings, datetimes, etc.

Infinity() is greater than any of these objects except float(‘inf’) and float(‘nan’). NegativeInfinity included as well.

uiset fully supports Python3. Tested on python 2.7, 3.2, 3.3, 3.4.

Project details


Release history Release notifications

This version
History Node

0.2.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
uiset-0.2.2-py2-none-any.whl (13.0 kB) Copy SHA256 hash SHA256 Wheel py2 Jan 21, 2018
uiset-0.2.2-py3-none-any.whl (13.0 kB) Copy SHA256 hash SHA256 Wheel py3 Jan 21, 2018
uiset-0.2.2.tar.gz (24.7 kB) Copy SHA256 hash SHA256 Source None Jun 20, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page