3 ms·
You’re right. “Side effect” here means that your program’s behavior changes simply by importing something, eg by monkey patching something else. If’s not: * I
by kstrauser 1y ago
You’re right. “Side effect” here means that your program’s behavior changes simply by importing something, eg by monkey patching something else.
If’s not:
* Importing other modules.
* Taking a long time to import.
* Writing .pyc files.
If any program can “import foo” and still execute exactly the same bytecode afterward as before, you can say that foo doesn’t have side effects.