{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/16"},{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content/3"}],"enrichment":{"capability":"Provides an Infinity class that can be compared to any object and supports arithmetic operations, offering a more flexible alternative to Python's built-in float('inf').","skillfed_tags":["numeric-sentinel","comparison-protocol"],"use_cases":["Implementing algorithms that need a universal upper or lower bound comparable to any type, not just numbers","Creating priority queues or sorting logic where infinity must compare correctly with dates, strings, or custom objects","Building mathematical or constraint-solving code that requires strict handling of undefined operations like inf - inf","Replacing ad-hoc sentinel values (e.g., sys.maxsize) with a proper infinity abstraction"],"what_it_does":"infinity provides a single Infinity class that represents an infinity value comparable to any object in Python, addressing limitations of the built-in float('inf'). Unlike float infinity, the Infinity class supports rich comparisons with arbitrary types (e.g., datetime objects) and enforces mathematically correct behavior\u2014for instance, pow(1, inf) raises TypeError rather than returning 1.\n\nThe package supports arithmetic operations (addition, subtraction, multiplication, division, exponentiation) with sensible semantics: inf + 3 returns inf, 5 / inf returns 0, but undefined operations like inf - inf or pow(1, inf) raise TypeError. It also coerces to float, string, and boolean types. However, the package has been abandoned since 2020 with no active maintenance.","worth_installing":"No. The package is abandoned (last release 2020-06-03, no commits since) and high install friction makes it a poor choice for new projects. Modern Python versions have better alternatives: use float('inf') for numeric comparisons, or implement a custom comparable wrapper for your specific type. Only consider it if you have legacy code already depending on it."},"id":"infinity","links":{"html":"https://skillfed.io/packages/infinity","md":"https://skillfed.io/packages/infinity.md","pypi":"https://pypi.org/project/infinity/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2020-06-03","license_spdx":null,"license_treatment":"permissive","name":"infinity","python_support":"unspecified","summary":"All-in-one infinity value for Python. Can be compared to any object."},"popularity":{"monthly_downloads":182955,"position":10077,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.5"}
