Initializing a set from a list
robert.kern at gmail.com
Wed Jun 21 20:43:28 CEST 2006
> Sybren Stuvel wrote:
>>Xiaolei enlightened us with:
>>>from pylab import *
>>You'd better not do that. Just use "import pylab".
>>>If I remove the first line, I correctly get:
>>>[1, 2, 3, 3]
>>>set([1, 2, 3])
>>Pylab shadows the built-in set name, which is one of the reasons you
>>should generally use "import XXX" instead of "from XXX import *".
> Ahh. Understood. Thank you very much.
It should be noted that recent versions of matplotlib's pylab module have
changed that function to setp() in order to avoid this problem.
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list