{
  "$type": "site.standard.document",
  "canonicalUrl": "https://rednafi.com/python/functools-partial-flattens-nestings-automatically/",
  "description": "Discover how Python's functools.partial automatically detects and flattens nested partial applications for optimal performance and cleaner code.",
  "path": "/python/functools-partial-flattens-nestings-automatically/",
  "publishedAt": "2021-11-08T00:00:00.000Z",
  "site": "at://did:plc:fgtm2c26vfcj74rfmeggbyqj/site.standard.publication/3mnl6f7ob462z",
  "tags": [
    "Python"
  ],
  "textContent": "The constructor for functools.partial() detects nesting and automatically flattens itself\nto a more efficient form. For example:\n\nThis returns:\n\nFurther reading\n\n- [Tweet by Raymond Hettinger]\n\n\n\n\n[tweet by raymond hettinger]:\n    https://twitter.com/raymondh/status/1454865294120325124",
  "title": "Python's 'functools.partial' flattens nestings Automatically"
}