Skip to content

Commit

Permalink
gh-109495: Remove unused slots from the Python implementation of date…
Browse files Browse the repository at this point in the history
…time (GH-109494)
  • Loading branch information
Gobot1234 authored Sep 29, 2023
1 parent 20bc5f7 commit 7d57288
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/_pydatetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -1684,7 +1684,7 @@ class datetime(date):
The year, month and day arguments are required. tzinfo may be None, or an
instance of a tzinfo subclass. The remaining arguments may be ints.
"""
__slots__ = date.__slots__ + time.__slots__
__slots__ = time.__slots__

def __new__(cls, year, month=None, day=None, hour=0, minute=0, second=0,
microsecond=0, tzinfo=None, *, fold=0):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unnecessary extra ``__slots__`` in :py:class:`datetime`\'s pure python implementation to reduce memory size, as they are defined in the superclass. Patch by James Hilton-Balfe

0 comments on commit 7d57288

Please sign in to comment.