Re: are elements of a list in sequence in list b

2008-02-08 Thread Tomek Paczkowski
[EMAIL PROTECTED] wrote: > Hallo, > > > I need to search list a for the sequence of list b > I guess most pythonic would be sth like this: [code] def naive_seq_match(sequence, pattern): """Serches for pattern in sequence. If pattern is found returns match start index, else returns No

Re: Critique of first python code

2008-02-08 Thread Tomek Paczkowski
Zack wrote: > Hi all. I'm just starting to pick up python. I wanted to play with nested > lists so first I wrote a little bit of code to create arbitrarily nested > lists (grow). Then I wrote a breadth first search. I'm putting this small > snippet up asking for criticism. Was there a more elegan

Re: Puzzled by behaviour of class with empty constructor

2008-01-25 Thread Tomek Paczkowski
[EMAIL PROTECTED] wrote: > Hello, > > I have a class called 'Axis' that I use as a base class for several > types of axes that can be created by a grid generation program that I > have written: equally-spaced grids, logarithmic grids, etc. In any > case, if I use this base class by itself, I see