4 ms·
If you are using the interpreter directly then that particular bit of advice is hard to follow since you basically live in global all the time. For that reason
by hyperion2010 12y ago
If you are using the interpreter directly then that particular bit of advice is hard to follow since you basically live in global all the time. For that reason I would say that this advice applies mainly to .py files.
- LyndsySimon 12y agoAgreed. There's a big difference between "scripting" and "writing software" in terms of best practices. If you're writing some ETL scripts in an IPython notebook, it would be overkill to encapsulate everything to keep your global scope clean.