
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
immutable-Python-Type
Advanced tools
package for make immutable all types in Python
Int_()Float_()Str_()Bool_()Set_()Tuple_()List_()Dict_()from immutableType import Bool_, Int_
immutable_bool = Bool_(True) # init immutable boolean
immutable_int = Int_(1) # init immutable integer
immutable_bool.bool_ = 1234 # raise an error
immutable_bool.bool_ = False # good
print(immutable_int == immutable_bool) # print False
"""
Immutable boolean consider True = 1 and False = 0
"""
Int_(integer: int)from immutableType import Int_
my_int = Int_(1234) # init immutable integer
my_int.int_ # property to get the value in 'int' type
Int_()have methods :
__str__: return string with the integer value__int__: return the integer value__bool__: return True if the value == 1 else False__eq__, __and__, __or__, __iand, __ior__: basic comparaison__add__, __sub__, __iadd__, __isub__, __mul__, __imul__, __truediv__, __itruediv__, __pow__, __ipow__: basic operation (only int value are accepted for operation. The result of a division is always an integer. Use Float_ class for more precision.)
redaction in progress...
FAQs
A immutable type for Python
We found that immutable-Python-Type demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.