[PyQt] PyQt4.Qtcore defines 'hex'
phil at riverbankcomputing.com
Wed Jan 7 10:41:59 GMT 2009
On Wed, 07 Jan 2009 10:33:00 +0000, Chris Withers <chris at simplistix.co.uk>
> Giovanni Bajo wrote:
>> On mer, 2009-01-07 at 09:26 +0000, Chris Withers wrote:
>>> Phil Thompson wrote:
>>>> On Tue, 06 Jan 2009 14:19:50 -0500, Neal Becker <ndbecker2 at gmail.com>
>>>>> A bit nasty, since I see (and follow) lots of examples that say:
>>>>> from PyQt4.QtCore import *
>>>>> This redefines the builtin hex.
>>>> Check the Roadmap.
>>> Appending a _ just to make an unpleasant style of programming work
>>> like a pretty silly idea.
>>> I, along with everyone else who's tryng to learn a new python package,
>>> absolutely *hate* "from x import *" as it makes it much more difficult
>>> figure out where something is coming from.
>> So don't use it.
> You rather miss my point.
> I don't ever use star imports anyway.
> However, like most people, I learn by example, and when the examples
> contain exclusively start imports, they are much less helpful than they
> could be.
> It's a shame PEP8 doesn't make a pronouncement on this. PEP 328 is
> pretty clear though...
>> This has been discussed thousands of times and it starts getting
> Yes, it is annoying that all the example code continues to be in a form
> that confuses users trying to learn PyQt.
*None* of the PyQt4 examples uses star imports.
More information about the PyQt