On the brush, and on the bottle!

This image, from the collections at MAD Paris (https://madparis.fr), brought to mind the vintage Messy Nessy Chic piece about France’s ‘Santé Sobriété’ (health, sobriety) campaign in the 1950s.

https://www.messynessychic.com/2016/12/23/no-more-than-a-litre-of-wine-a-day-recommends-a-1950s-french-sobriety-campaign/

#Sante #Cheers #Alcohol #Decorators #Painters

Attributes vs Decorators: Metadata Systems Battle

PHP 8 attributes vs JavaScript decorators (proposed). Which language's metadata system is more powerful? This will make you rethink everything!

#php #javascript #phpvsjavascript #attributes #decorators #metadata #php8 #annotations #programmingcomparison #codecomparison #frameworkfeatures #viralcoding

https://www.youtube.com/watch?v=ZpgvS9n6grY

Attributes vs Decorators: Metadata Systems Battle #attributes

YouTube

Acabei de publicar um texto novo no Bolha sobre decorators em Python: em vez de tratar decorator como “mágica”, eu mostro passo a passo o que acontece quando você escreve @meu_decorator em cima de uma função, como o Python avalia isso internamente e como isso vira só uma atribuição de função em tempo de definição.

Além de destrinchar o funcionamento interno, o artigo mostra como criar seus próprios decorators do zero, primeiro na forma “manual” (sem sintaxe de @), depois evoluindo para exemplos práticos como log, medição de tempo de execução e validação de argumentos.

Se você quer entender de verdade o que está acontecendo por baixo do capô quando usa decorators — e parar de só copiar exemplo de Stack Overflow — vale dar uma lida:

https://bolha.blog/riverfount/decorators-internamente-como-funcionam-e-como-criar-os-seus

#Python #Decorators

Decorators Internamente: Como Funcionam e Como Criar os Seus

Se você escreve Python há algum tempo, já usou decorators sem perceber. O @app.route do Flask, o @pytest.mark.parametrize, o @dataclass d...

Riverfount

Decorators are optional, and privacy in Python is mostly convention.

#python #decorators #coding

Attributes vs Decorators: Metadata Magic Showdown

PHP 8 attributes vs Python decorators. Which language's metadata system is more powerful? This will make you rethink everything!

#php #python #phpvspython #attributes #decorators #metadata #php8 #annotations #programmingcomparison #codecomparison #frameworkfeatures #viralcoding

https://www.youtube.com/watch?v=ekneYNOCyqQ

Attributes vs Decorators: Metadata Magic Showdown #metadata

YouTube

Decorators vs Higher-Order Functions: Function Enhancement Battle

Python decorators vs JavaScript higher-order functions. Which approach to function enhancement is more elegant? Mind-blowing comparison!

#python #javascript #pythonvsjavascript #decorators #higherorderfunctions #functioncomposition #programmingcomparison #codecomparison #pythontricks #javascripttricks #functionalprogramming #viralcoding

https://www.youtube.com/watch?v=jGc0YMGEKz8

Decorators vs Higher-Order Functions: Function Enhancement Battle #pythontricks

YouTube

Python Advanced Function Decorators With Arguments

Learn advanced Advanced Function Decorators With Arguments techniques in Python
Master powerful patterns and best practices
Boost your Python programming skills

#python #programming #tutorial #coding #advanced #function #decorators

https://www.youtube.com/watch?v=uAbrzFCVsFI

Python Advanced Function Decorators With Arguments #programming

YouTube

What is a decorator in Python?

A decorator is a function that takes another function, adds some extra behavior, and returns a new function. You use it when you want to add common logic, like logging, timing, authentication or validation, without changing the original function code.

#pythoninterview #pythondecorator #pythonjobprep #pythoncodinginterview #pythonpeak #pythonquestions #juniorpython #pythonconcepts #decorators #pythonprogramming

https://www.youtube.com/watch?v=79vsKNpN4QA

What is a decorator in Python? #pythonprogramming

YouTube

Every so often I get an email notification from some starred bug report about TC39 decorators, and I peek at what's going on, and it seems like the current situation is that it's fully standardized but all 3 browsers went "This is complicated and we don't feel like implementing it" 😞

#JavaScript #Decorators #TC39

I got less traffic for my Python article than I expected, so I added "Python" to the title, and inserted some section headers to break things up a bit, and make the flow of my thinking a bit clearer.

I was pretty happy with how this project turned out. This decorator makes the re.sub function simpler to work with. The decorator simplifies the re.sub API, wrapping your own function that takes in strings and returns a string. https://medium.com/@ptmcg/re-sub-as-a-decorator-madness-717eea7ded50 #python #decorators #regularexpressions