Colton Myers: Decorators: A Powerful Weapon in your Python Arsenal - PyCon 2014

  Рет қаралды 29,553

PyCon 2014

PyCon 2014

Күн бұрын

Speaker: Colton Myers
Decorators are an invaluable addition to anyone's arsenal of python tools and tricks. We will learn what a decorator is, how decorators are created, and then explore some of the cooler applications for decorators in our everyday projects.
Slides can be found at: speakerdeck.co... and github.com/PyC...

Пікірлер: 12
@PixelOutlaw
@PixelOutlaw 8 жыл бұрын
Good overview of using Python in a relatively powerful yet little used way. This video echoes the intention of dynamic programming conceptually presented in the SICP videos from MIT. Very enjoyable.
@ranjithparuchuri6463
@ranjithparuchuri6463 9 жыл бұрын
great explanation
@babuarthimalla678
@babuarthimalla678 8 жыл бұрын
nice explaination
@736939
@736939 6 жыл бұрын
I didn't understood at 19:34 how did he counted the function calls - first, he calculates +=1 and then update to 0, so initialization of counter should be done After ??? :(
@CSryand2m
@CSryand2m 8 жыл бұрын
What is the line on the bottom at 16:30? I feel like it's being cut off. How is myfunc being called in that?
@PerfectEn3my
@PerfectEn3my 8 жыл бұрын
Slides: speakerdeck.com/pycon2014/decorators-a-powerful-weapon-in-your-python-arsenal-by-colton-myers String itself: myfunc = skipIf(True, 'I hate doge')(myfunc)
@devaggarwal1220
@devaggarwal1220 7 жыл бұрын
thx
@markwiygul6356
@markwiygul6356 7 жыл бұрын
How many decorators can I add. I'd like 3 or more in a column.
@rednafi
@rednafi 4 жыл бұрын
Infinite. But remember, with decorators you are calling the decorated function within a wrapper function. So It's not recommended to stack more than two as it can considerably slow down your function run time.
@siddhantloya9587
@siddhantloya9587 7 жыл бұрын
why do you return ret at 8:44 . since it is only None
@asdfasdfuhf
@asdfasdfuhf 7 жыл бұрын
In the example he showed, you are correct it wasnt necessary; but if the function would have returned some value, it would have been necessary. So basically, it doesn't do anything.. yeah. Edit: he actually also said it it at: 11:33
@nathanphillips6433
@nathanphillips6433 6 жыл бұрын
"um"
Greg Ward - How to Write Reusable Code - PyCon 2015
29:52
PyCon 2015
Рет қаралды 45 М.
DID A VAMPIRE BECOME A DOG FOR A HUMAN? 😳😳😳
00:56
This mother's baby is too unreliable.
00:13
FUNNY XIAOTING 666
Рет қаралды 40 МЛН
1 сквиш тебе или 2 другому? 😌 #шортс #виола
00:36
Brandon Rhodes: The Day of the EXE Is Upon Us - PyCon 2014
28:03
Reuven M. Lerner - Practical decorators - PyCon 2019
29:12
PyCon 2019
Рет қаралды 42 М.
Alex Gaynor: Fast Python, Slow Python - PyCon 2014
36:11
PyCon 2014
Рет қаралды 62 М.
Loop like a native: while, for, iterators, generators
29:15
Next Day Video
Рет қаралды 118 М.
Ned Batchelder: Getting Started Testing - PyCon 2014
42:44
PyCon 2014
Рет қаралды 58 М.
Raymond Hettinger - Super considered super! - PyCon 2015
46:52
PyCon 2015
Рет қаралды 123 М.
DID A VAMPIRE BECOME A DOG FOR A HUMAN? 😳😳😳
00:56