Coding style
rurpy at yahoo.com
rurpy at yahoo.com
Mon Jul 17 16:42:49 EDT 2006
More information about the Python-list mailing list
Mon Jul 17 16:42:49 EDT 2006
- Previous message (by thread): Coding style
- Next message (by thread): Coding style
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
PTY wrote: > Which is better? > > lst = [1,2,3,4,5] > > while lst: > lst.pop() > > OR > > while len(lst) > 0: > lst.pop() A dozen posts, but nobody has posted the right answer yet, so I will :-) It doesn't matter -- use whichever you prefer (*) This is an angels on the head of a pin issue. (*) -- If your code is part of an existing body of code that uses one or the other style consistently, then you should do the same.
- Previous message (by thread): Coding style
- Next message (by thread): Coding style
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list