closures and decorators Flashcards

1
Q

rule for name lookup

A

LEGB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

doc string property in function object

A

__doc__

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

function for passing metadata to decorator

A

functools.wraps(f)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

property decorator

A

property(fget=None, fset=None, fdel=None, doc=None)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

setter decorator

A

@p.setter()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly