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

Create a scaffold for lessons delving deeper into functions #69

Open
willingc opened this issue Oct 23, 2024 · 1 comment
Open

Create a scaffold for lessons delving deeper into functions #69

willingc opened this issue Oct 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@willingc
Copy link
Contributor

willingc commented Oct 23, 2024

Functions are a broad subject in development. There are a lot of things that folks learn over time.

Let's begin working on a scaffold of important topics for learner progression.

Leave thoughts of topics here.

See discussion in #58 and #67 for more ideas.

@sneakers-the-rat
Copy link
Contributor

sneakers-the-rat commented Oct 23, 2024

off the top of my head:

  • type annotations (not function-specific but i have to write this so my fingers stop screaming at me to type it)
  • *args, **kwargs (and when to use them)
  • generators
  • context managers
  • decorators
  • async
  • closures
  • currying/functools.partial
  • lambdas
  • descriptors/dynamic binding functions -> instance methods

on more of the "how-to/best practices/software design" side of things...

  • pure functions/stateful functions/idempotency, maybe in the context of concurrency?
  • functional programming in python - map/filter/itertools
  • operators as functions (the operator module)
  • module-level dunder methods - modules as classes
  • wrapping and metaprogramming
  • caching with lru_cache as a way to introduce hashable vs. unhashable and why that's important
  • "how do pytest fixtures work" as like a worked example of advanced metaprogramming with functions
  • "functions are objects" and the python data and execution model

cruising around the stdlib and language reference docs always make me with the python core devs accepted my PR to make the docs more navigable, but alas, i unfortunately had the audacity to turn issue number 123456 into a shitpost at the same time and so i think it's forever doomed to purgatory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants