Skip to content

Comments

Add Python Decorator pattern.#2

Open
stankudrow wants to merge 7 commits intodevelopfrom
decorator
Open

Add Python Decorator pattern.#2
stankudrow wants to merge 7 commits intodevelopfrom
decorator

Conversation

@stankudrow
Copy link
Owner

@stankudrow stankudrow commented Jan 21, 2026

Decorator pattern in Python - behold the ease and power of it.

@stankudrow stankudrow self-assigned this Jan 21, 2026
@stankudrow stankudrow added the structural Structural Design Pattern label Feb 1, 2026
"id": "61a091d8",
"metadata": {},
"source": [
"It may seem slick, yet 1) it is static and forms 2) a string of calls which are 3) functional but verbose in a way. Is there an option to reduce this chain of invocations to just one call? In short, yes and decorator patter aims for it. Examples go first and attention to the specially designed functions with a similar structure:\n",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It may seem slick,

The word 'slick' is more typical of commercials and marketing rather than technical descriptions, so I'd use 'elegant/convenient/concise', for example

  1. decorator patter aims for it

A typo, I guess: pattern, and I'd also use an article here: the pattern

  1. Examples go first and attention to the specially designed functions with a similar structure:\n

This sentence looks weird (and, perhaps, you wrote it like this intentionally, but it's really unnatural). I'd say someting like 'Let’s start with some examples, paying special attention to the specially designed functions with a similar structure.'

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewritten, to be pushed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

structural Structural Design Pattern

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants