decorators   1204

« earlier    

Python Decorators: How to Use it and Why?
A decorator takes in a function, adds some functionality and returns it. In this article, you will learn how you can create a decorator and why you should use it.
python  decorators  programming  software 
5 weeks ago by jonaslorander
Primer on Python Decorators – Real Python
In this introductory tutorial, we'll look at what Python decorators are and how to create and use them.
python  decorators  tutorial 
december 2018 by cychong47
Primer on Python Decorators – Real Python |
<code class="language-python">
def repeat(_func=None, *, num_times=2):
def decorator_repeat(func):
def wrapper_repeat(*args, **kwargs):
for _ in range(num_times):
value = func(*args, **kwargs)
return value
return wrapper_repeat

if _func is None:
return decorator_repeat
return decorator_repeat(_func)
python  newbie  language  idiom  decorators  solution 
november 2018 by kme
Understanding Design Patterns in JavaScript
In software engineering, a design pattern is a reusable solution for commonly occurring problems in software design. Design patterns represent the best practices used by the experienced software developers. A design pattern can be thought of as a programming template.
javascript  patterns  modules  iife  factories  decorators 
october 2018 by spaceninja

« earlier    

related tags

angular  angular5  animation  ascii_art  asynchronous  asyncio  awesome  backoff  bestpractices  blogpost  book  bytecode  centralheating  classes  classmethod  code  compileroptions  composition  cra  datastructure  debug  decorator  design-patterns  django  dry  eject  electricians  ember  error-handling  error  es6  es7  exceptions  exponential  factories  flask  fp  fun  functional  further_reading  gem  getpocket  gist  github  golang  goto  guido  heating  house  howto  idiom  ifttt  iife  interesting  io  ionic  itp  javascript  js  jsconfig  language  learning  library  links  list  logging  maintenance  metaprogramming  mobx  modules  newbie  orm  pandas  patterns  plumbers  primer  profiling  programming  property  python  rails  react-app  react  reference  reflection  requests  retry  retrying  ruby  scala  snippet  software  solution  sqlalchemy  stack-overfow  stem  subclasses  support  synchronous  syntax  test  testing  tfav  time  tricks  tutorial  twitter  typescript  view-models  vs  vscode  web  webdevel  which 

Copy this bookmark: