pull down to refresh
0 sats \ 3 replies \ @WeAreAllSatoshi 8 Apr \ parent \ on: How and why I wrote my own TOTP 2FA client. [metadata][privacy] privacy
sorry yea I meant import, not create.
Thank you for the follow up!
More on
import
in Python: https://docs.python.org/3/reference/import.html I almost always use it with from
in order to avoid importing too much, in the case of this app to avoid importing HOTP for examplereply
Does that really matter when you just run local? I assumed the entire package would be installed from the package repository and then only certain parts are loaded into memory depending on the import syntax? I guess if you're concerned about memory usage, maybe it's valuable. But it isn't like client-side JS where the code is shipped to a client across a network.
Appreciate the discussion, btw :)
reply
I guess if you're concerned about memory usage, maybe it's valuable. But it isn't like client-side JS where the code is shipped to a client across a network.
Correct. It is about memory. Also using
from
allows for using less repetitive and less error-prone syntax.reply