diff --git a/CHANGELOG.md b/CHANGELOG.md index 70c1c87..cad8eb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## v0.3.1 + +### Changed + +- Use `__slots__` to optimize memory usage. + ## v0.3.0 ### Added diff --git a/mp_yearmonth/yearmonth.py b/mp_yearmonth/yearmonth.py index b24ac22..cd2c3c0 100644 --- a/mp_yearmonth/yearmonth.py +++ b/mp_yearmonth/yearmonth.py @@ -41,6 +41,8 @@ class YearMonth: month (int) : The month. """ + __slots__ = ("year", "month") + def __init__(self, year: int, month: int): """Create a new YearMonth object. diff --git a/pyproject.toml b/pyproject.toml index 2b236e0..1500082 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mp-yearmonth" -version = "0.3.0" +version = "0.3.1" description = "A year-month datatype for Python." keywords = ["year", "month", "date", "calendar"] authors = ["Ramon Torres "]