Re: [Tutor] A Pythonic LinkedList Implementation

2005-03-28 Thread Pierre Barbier de Reuille
Well, my opinion about your code : At first, it seems far too complex for what it is ! First, there is a whole lot of useless tests ! For example : if node is not None and type(node) == list The "node is not None" is useless, because the type of None is ... NoneType so type(node) == list is enou

Re: [Tutor] A Pythonic LinkedList Implementation

2005-03-28 Thread Orri Ganel
I'm not at all sure this is, indeed, helpful *grin*. I was just looking for a project to code, and decided to implement a LinkedList. The how of using it is very simple: in the same way you would use a regular list. Except for a few extra/different methods, the use of LinkedList is very similar

Re: [Tutor] A Pythonic LinkedList Implementation

2005-03-28 Thread Chad Crabtree
I'm at a loss as to why this is helpful. How and why would one use this instead of a regular list? I know what linked lists are and why they would be useful in C++ or C or any other but not python. Orri Ganel wrote: >Hello all, > > > >I've been working on making a complete pythonic LinkedList

[Tutor] A Pythonic LinkedList Implementation

2005-03-28 Thread Orri Ganel
Hello all, I've been working on making a complete pythonic LinkedList implementation, as per the specifications of Java's LinkedList and Python's list. The full code may be found at http://rafb.net/paste/results/JKhsQn59.html. Once the link expires, please feel free to email me for the code. An