Questions on Using Python to Teach Data Structures and Algorithms

Steve Holden steve at holdenweb.com
Thu Sep 28 11:42:07 EDT 2006


Brendon Towle wrote:
> Some of your Lisp translations are subtly off...
> 
> 
> 
>>Date: 28 Sep 2006 02:49:50 -0700
>>From: "sturlamolden" <sturlamolden at yahoo.no>
>>Subject: Re: Questions on Using Python to Teach Data Structures and
>>	Algorithms
>>To: python-list at python.org
>>
>>If you want to make a chained structure, then perhaps you know LISP?
>>This is what the basic machinery of LISP looks like in Python:
>>
>>def cons(a,b)
>>   return [a,b]
> 
> 
> should be:
>      return [a].extend(b)
> 
But surely this will return None?

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd          http://www.holdenweb.com
Skype: holdenweb       http://holdenweb.blogspot.com
Recent Ramblings     http://del.icio.us/steve.holden




More information about the Python-list mailing list