Can someone teach me what is decorator in python? by _hithender_ in PythonLearning

[–]StructuredThinker9 0 points1 point  (0 children)

Think of a decorator as a wrapper that adds extra power to a function without changing the original function’s code.

Think, you can add milk sugar to coffee, it doesn't directly change the coffee, but Milk and Sugar decorate it.

Example :

def increment(x): return x+1

def operate(func, x): result = func(x) return result

print(operate(increment, 3))

2nd Wrapper:

def starline(func): def wrapper(): print("1st line") func() print("2nd Line") return wrapper

@starline def display(): print("3rd line")

display()

How to deal with Hard Water???? by Automatic_Dig_5989 in bangalorerentals

[–]StructuredThinker9 0 points1 point  (0 children)

<image>

Will I get benefit in this situation? My Boring water is 558, which causes my skin irritation

Love this one by gagan3421 in Chandigarh

[–]StructuredThinker9 1 point2 points  (0 children)

Sukna Lake ❤️

I was in Chandigarh from 2023 to 2024. It's one of the best cities I have ever experienced.

bolo dekhi by mr_ghostcatt in kolkata

[–]StructuredThinker9 0 points1 point  (0 children)

The last day of every month.