Python | Knowlegde Sessions Flashcards

1
Q

its lambda equivalent to arrow functions?

A

Yes, Python’s lambda functions are conceptually similar to arrow functions in JavaScript. Both are used for creating short, anonymous functions.

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

decorators, ky example, it takes the funcionality of whatever @is on top of the function

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

self is same as .this

self is reference of current instance of the class for that specific object

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

init special method, know as initializer. Its called automatically

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

@static methods

are methods to belong to class but dont requiered instance(object) specific data

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

inheretence

class Animal:

class Dog(Animal)

with super() you call super class constructor

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

can you modify a super class atribbute from a sub class?

A

yes

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

python: functional programming language.

Executes code line by line, up and down.

MRD, method resolution order
order in which classes are search when executin a method

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

multiple inheritence

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

method overloading

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

abstraction
@abstractionmethod

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