iteration over methods

A.M. Kuchling amk at amk.ca
Tue Jan 7 21:37:25 EST 2003


On Tue, 7 Jan 2003 11:56:49 -0800, 
	Chad Netzer <cnetzer at mail.arc.nasa.gov> wrote:
>> >              if func[0:4] == 'method':
>                          ^^^
>                          This will never be true.
> should be func[0:6] or func[:6]

Better still: if func.startswith('method')

--amk




More information about the Python-list mailing list