Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed outdated comment #7955

Merged
merged 1 commit into from
Apr 7, 2024
Merged

Removed outdated comment #7955

merged 1 commit into from
Apr 7, 2024

Conversation

radarhere
Copy link
Member

Before #7641, # initialize mode cache made sense, as it came before initialising a dictionary.

def getmode(mode: str) -> ModeDescriptor:
"""Gets a mode descriptor for the given mode."""
global _modes
if not _modes:
# initialize mode cache
modes = {}

Now it doesn't make sense, as the cache is managed by @lru_cache, and the following line determining endianness has nothing to do with the cache.

@lru_cache
def getmode(mode: str) -> ModeDescriptor:
"""Gets a mode descriptor for the given mode."""
# initialize mode cache
endian = "<" if sys.byteorder == "little" else ">"

This PR removes the comment.

@hugovk hugovk merged commit 33a73b5 into python-pillow:main Apr 7, 2024
56 of 57 checks passed
@radarhere radarhere deleted the imagemode branch April 7, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants