PTY wrote:
> Which is better?
>
> lst = [1,2,3,4,5]
>
> while lst:
> lst.pop()
>
> OR
>
> while len(lst) > 0:
> lst.pop()
>
I think the first one is better, but if all you are doing is removing
all the items in the list, this is definitely better:
lst = []
-Don
--
http://mail.python.o
tac-tics wrote:
>
> I'd say the second one. Empty lists are not false. They are empty. Long
> live dedicated boolean data types.
>
Uh, no, empty lists are False in a boolean context:
http://docs.python.org/lib/truth.html
-Don
--
http://mail.python.org/mailman/listinfo/python-list
Try this:
http://www.demonseed.net/~jp/code/magic.py
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I don't realy care what database I use wx.grid or whatever. I
> wan't it to look at a line
>
> 128 9023 23428 exc and create the database or pick something out of the
> file as some sort of a descrition line and then display and allow the
> user to change and add
Mateuszk87 wrote:
> Hi.
>
> may someone explain "yield" function, please. how does it actually work
> and when do you use it?
>
> thanks in forward
>
> mateusz
>
http://docs.python.org/ref/yield.html
--
http://mail.python.org/mailman/listinfo/python-list
Maric Michaud wrote:
> Le Mercredi 31 Mai 2006 12:03, Manoj Kumar P a écrit :
>> Hi,
>>
>> Can anyone tell me a good python editor/IDE?
>> It would be great if you can provide the download link also.
>
> I didn't see on this list much PyQT users, is there a consensus about it ?
>
> I vote for lin
I'm trying unsuccessfully to do something in Tk that I though would be
easy. After Googling this all day, I think I need some help. I am
admittedly very novice with Tk (I started with it yesterday), so I am
sure I am overlooking something simple.
The basic idea is that my application will consi
I need to detect whether the operating system I am running on (not the
Python version) is 64bit or 32bit. One requirement is that I need to
include support for non-Intel/AMD architectures.
The 2 ways I have thought detecting 64bit are:
1. struct.calcsize("P") == 8
2. '64' in os.uname()[4]
I'm