contributing to an open source project

2007-12-05 Thread kdt
Hi,

I am looking for an open source project to contribute to, to enhance
my python skills. I have about 6 months experience in the language. I
have searched freshmeat.net, but as I'm pretty new, I'm not sure which
projects I would be able to contribute to.

If anyone can suggest any open source projects python projects that
would be suitable for a beginner, and where mentoring might be an
option, please let me know.

Thanks

karma
-- 
http://mail.python.org/mailman/listinfo/python-list


palindrome function

2008-07-11 Thread kdt
Hi all,

Can someone please explain to me why the following evaluates as false?

>>>list=['a','n','n','a']
>>>list==list.reverse()
>>>False

I'm stumped :s
--
http://mail.python.org/mailman/listinfo/python-list


Re: palindrome function

2008-07-11 Thread kdt
On Jul 11, 11:34 pm, Denis Kasak <[EMAIL PROTECTED]>
wrote:
> On Sat, Jul 12, 2008 at 12:22 AM, kdt <[EMAIL PROTECTED]> wrote:
>
>  > Hi all,
>  >
>  > Can someone please explain to me why the following evaluates as false?
>  >
>  >>>>list=['a','n','n','a']
>  >>>>list==list.reverse()
>  >>>>False
>  >
>  > I'm stumped :s
>
> Read the documentation on list.reverse().
>
> Basically, it reverses the list in place, so it modifies the list which
> called it. It does not return a /new/ list which is a reversed version
> of the original, as you expected it to. Since it doesn't return anything
> explicitly, Python makes it return None. Hence, the comparison you are
> doing is between the original list and a None, which is False, naturally.
> Try this:
>
> spam = ['a', 'n', 'n', 'a']
> eggs = spam[:]
> if spam.reverse() == eggs:
>     print "Palindrome"
>
> Also, 'list' is a really bad name for a list, since this is the name of
> the builtin type object for the list type.
>
> --
> Denis Kasak

thanks for the explanation :D
--
http://mail.python.org/mailman/listinfo/python-list