Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

colorama module | The Beautiful Colorful Module | Hydra's Tutorial

(Jun 25, 2013 03:53 AM)PigBacon Wrote:  Please don't suggest people use from foo import *; it pollutes the global namespace and can break things without you knowing why really easily.
It's fine to support select functions/modules/classes/whatever (from foo import bar, baz, qux), but import * is just tacky.

I agree with this, unless the classes are prefixed with something recognizable for example all PyQt classes start with the letter 'Q'. Also it's much easier to type

Code
app = QApplication(sys.argv)

than

Code
app = PyQt4.QtCore.QApplication(sys.argv)


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by w3w3w3Aug 3, 2021 12:38 PM 1 328 Aug 3, 2021 12:38 PM
Last Post: SIM-5058597
[Shell] by ɩᴄᴀʀᴜȿ ᴌוᴠᴇѕ™Aug 26, 2017 04:53 AM 3 210 Aug 26, 2017 04:53 AM
Last Post: SIM-1073426
[Python] by CocoaNutFeb 2, 2016 12:07 PM 0 108 Feb 2, 2016 12:07 PM
Last Post: CocoaNut