recursion problem

Duncan Booth duncan at NOSPAMrcp.co.uk
Mon Sep 17 11:23:44 EDT 2001


Uwe Schmitt <schmitt at num.uni-sb.de> wrote in 
news:9o51uk$441g6$1 at hades.rz.uni-sb.de:

> and then i get a message like "None object has no attribute append()"...
> 
> 
> Where does the "None" in the last line come from ? I don't understand
> this behaviour of my routine. Each return-statement in my
> script returns a list...
Nope. One of them returns the result of calling the append method on a 
list. The append method modifies the list and returns None.
> 
> Is this a python bug ? Is it possible that the stack is corrupted ???
> Or am i just stupid ?
No, no, and probably also no.



-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list