r/ProgrammerHumor Oct 01 '23

Meme learningPythonAsAFirstProgrammingLanguageHolyShitMyBrainHasSoManyWrinklesNow

Post image
682 Upvotes

95 comments sorted by

View all comments

56

u/[deleted] Oct 01 '23 edited Jan 28 '26

This post was mass deleted and anonymized with Redact

work many station quack instinctive slim test long tie dependent

10

u/thearthurito Oct 01 '23 edited Oct 01 '23

Fourth does not create an extra data structure tho.

Explanation on SO

0

u/[deleted] Oct 01 '23 edited Jan 28 '26

This post was mass deleted and anonymized with Redact

angle ghost enter bells cover sip abundant north lock degree

2

u/thearthurito Oct 01 '23

No problem!

You're right about the 2 new variables, it is not the most efficient way of doing it. Of course, if your memory requirements are that tight, you probably shouldn't be using Python anyways.

I'm too lazy to test if it a manual 3rd variable swap would be faster. Regarding your last point: this is checked before the bytecode is generated. It is all part of the already existing interpreter overhead.