₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,255 members, 8,421,022 topics. Date: Friday, 05 June 2026 at 04:47 PM

Toggle theme

How To Cause Pain For Yourself In Python - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingHow To Cause Pain For Yourself In Python (947 Views)

1 Reply (Go Down)

How To Cause Pain For Yourself In Python by ektbear(op): 5:34pm On Nov 26, 2012
You may wonder, how can I make my life as painful as possible?

Well, an easy way to do it is to do mass imports, i.e.

from library import *

This can create very subtle, difficult to track bugs.

I've been burned twice by this in two weeks grin
Re: How To Cause Pain For Yourself In Python by Nobody: 11:47pm On Nov 26, 2012
am fond of

from PyQt4 import QtCore, QtGui

importing * lets you import global variables too which can make life easier.
like i have all my init variables in a single file, i just "from init import *"
and i can use any member freely.
Re: How To Cause Pain For Yourself In Python by Seun(mod): 11:58pm On Nov 26, 2012
@ekt_bear: I agree. Never do that.
Re: How To Cause Pain For Yourself In Python by WhiZTiM(m): 3:41pm On Nov 27, 2012
coming from a C++ background, the *import as* in Python 3.x.x has saved me namespaces difficulty....
Re: How To Cause Pain For Yourself In Python by gsmcoder: 8:28pm On Nov 27, 2012
hahaha I was a victim of that back in the days. Thank God for almighty delphi cool cool cool cool
1 Reply

How To Code Your Own Personal Assistant In PythonQuadratic Equation Solving App I Developed In PythonOfficial Thread For Experts And Begineers In Python234

Nigerian Googler Talks On The Developer Ecosystem In Africa [Video, Pictures]Losing Motivation To ProgramI Need A Website Designer