News for hackers. Stuff that matters.
Re:Summary of Major Changes Between Python Versions by ptmcg on Saturday July 06, 2024 @10:04AM (#40890552)
In this snippet

```python if header.startswith("X-Forwarded-"): section = header.removeprefix("X-Forwarded-") ```

the `startswith()` check is unnecessary. If `header` doesn't start with "X-Forwarded-" then `header.removeprefix("X-Forwarded-")` just returns `header`.

Nice summary doc, with good examples. You can also visit [this site of mine](https://ptmcg.pythonanywhere.com/python_nutshell_app_a_searc...) to search for changes by version (3.7-3.11).

There are no comments on this comment yet.