Removed outdated comment by radarhere · Pull Request #7955 · python-pillow/Pillow
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.