Python Bytes

#251 A 95% complete episode (wait for it)

Informações:

Sinopsis

Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Brett Cannon Michael #1: auto-optional by Daan Luttik Did you know that concrete types cannot be None in Python typing? This is wrong: def do_a_thing(extra_info: str = None): ... auto-optional will fix it: def do_a_thing(extra_info: Optional[str] = None): ... Why would you want this? Easily modify external libraries that didn't pay attention to proper use of optional to improve mypy linting. Force consistency in your own code-base: Enforcing that None parameter implies an Optional type. Run via the CLI: auto-optional [path] Brian #2: Making World-Class Docs Takes Effort Daniel Stenberg Six requirements for a project to get a gold star docs in the code repo NOT extracted from the code examples, lots of examples, more than you think you need document every API call you provide easily accessible and browsable and hopefully offline