After a couple of weeks studying Python, I already have a few useful
scripts, including one that downloads 1500 Yahoo stock quotes in 6
seconds. However, many things are puzzling to me. I keep on seeing
things like "__main__" in scripts.  A more obscure example would be
"__add__" used in string concatenation. For example, I can use "Hello
"+"world (or just "Hello" "world") to join those two words. But I can
also use "Hello ".__add__("world"). When and why would I ever use
"__main__" or the many other "__whatever__" constructs?
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to