Δημοσιεύτηκε: 30 Δεκ 2011, 01:21
από pmav99
από εδώ http://docs.python.org/tutorial/modules ... 0000000000
έγραψε:There is even a variant to import all names that a module defines:
>>>

Κώδικας: Επιλογή όλων
>>> from fibo import *
>>> fib(500)
1 1 2 3 5 8 13 21 34 55 89 144 233 377


This imports all names except those beginning with an underscore (_).

Note that in general the practice of importing * from a module or package is frowned upon, since it often causes poorly readable code. However, it is okay to use it to save typing in interactive sessions.


http://bytebaker.com/2008/07/30/python-namespaces/
http://mail.python.org/pipermail/tutor/ ... 24188.html

Πιο συγκεκριμένα για την pyqt δεν παίζει και τόσο ρόλο, καθώς όλα τα ονόματα ξεκινάνε με "Q" αλλά γιατί να αποκτάς κακές συνήθειες ? ;) Επίσης κάνει να μη δουλεύει τόσο καλά το code completion αν χρησιμοποιείς IDE και μπορεί να βρεις προβλήματα σε προγράμματα τύπου py2exe, appinstaller κτλ
ps. H ερώτηση αφορά python και όχι pyqt... Είσαι και συντονιστής :P :D