₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,619 members, 8,512,795 topics. Date: Wednesday, 04 November 2026 at 02:25 AM

Toggle theme

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

Nairaland Forum › Science/Technology › Programming › How To Cause Pain For Yourself In Python (963 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 Python • Quadratic Equation Solving App I Developed In Python • Official Thread For Experts And Begineers In Python • 2 • 3 • 4

Help Required: I Need A Copy Of The Virtacoin Windows Wallet Virtacoin-qt.exe... • Needed Urgenly:A Programmer Dat Can Code In Results For Secondary School Website • Here Is New Android App For Kids To Learn