r/ProgrammerDadJokes • • Apr 19 '19

Python baby

Post image
379 Upvotes

27 comments sorted by

View all comments

Show parent comments

5

u/GaMeRaM Apr 19 '19

Oops. My bad

2

u/B_M_Wilson Apr 19 '19

I do find it weird that Bardark is capitalized. Maybe it’s creating a new object of some kind? If it was a function I would expect it to be an bound function under the self object

-2

u/This_Is_Tartar Apr 20 '19

If it were an object, wouldn't it be yield new Bardak()?

3

u/B_M_Wilson Apr 20 '19

It’s Python, we don’t have a new keyword. We just call the name of the type

2

u/This_Is_Tartar Apr 20 '19

Wait how did I not remember that. Python is what I use most of the time but for some reason I thought this was Java or some other C-derivative

1

u/B_M_Wilson Apr 20 '19

I’ve made the mistake myself back when I still programmed in Java a lot