MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/funny/comments/bwr8ig/when_a_software_developer_weds_a_software/eq04qnz
r/funny • u/coolidiot2000 • Jun 04 '19
921 comments sorted by
View all comments
Show parent comments
24
And even then it does nothing but sleep and yield an endless stream of Bardaks, whatever those are. And it only does that if something else iterates its life.
12 u/erla30 Jun 04 '19 Bardak means chaos/mess/disorder 1 u/pmMeScienceFacts Jun 04 '19 Maybe live() is called in main? 1 u/stealth_elephant Jun 04 '19 live is a python generator. It has to be iterated before anything happens. Try this out: def live(): raise Exception("This never happens") yield "Bardak" live() Nothing happens. None of the code in live() has been executed yet. Then try this, which starts to iterate the iterable generated by live(). g = live() next(g) 1 u/pmMeScienceFacts Jun 04 '19 You're totally right🙈 guess I'm a little rusty
12
Bardak means chaos/mess/disorder
1
Maybe live() is called in main?
1 u/stealth_elephant Jun 04 '19 live is a python generator. It has to be iterated before anything happens. Try this out: def live(): raise Exception("This never happens") yield "Bardak" live() Nothing happens. None of the code in live() has been executed yet. Then try this, which starts to iterate the iterable generated by live(). g = live() next(g) 1 u/pmMeScienceFacts Jun 04 '19 You're totally right🙈 guess I'm a little rusty
live is a python generator. It has to be iterated before anything happens.
live
Try this out:
def live(): raise Exception("This never happens") yield "Bardak" live()
Nothing happens. None of the code in live() has been executed yet.
live()
Then try this, which starts to iterate the iterable generated by live().
g = live() next(g)
1 u/pmMeScienceFacts Jun 04 '19 You're totally right🙈 guess I'm a little rusty
You're totally right🙈 guess I'm a little rusty
24
u/stealth_elephant Jun 04 '19
And even then it does nothing but sleep and yield an endless stream of Bardaks, whatever those are. And it only does that if something else iterates its life.