Why can not initialize the class?

Joel Goldstick joel.goldstick at gmail.com
Fri Aug 22 10:45:03 EDT 2014


On Fri, Aug 22, 2014 at 10:42 AM, luofeiyu <elearn2014 at gmail.com> wrote:
> how to fix the code then?
>
> On 8/22/2014 10:36 PM, Larry Martell wrote:
>>
>> The 'in' operator requires an iterable. When you do 'self.email = email'
>> set_email gets called and value is None.
>
>
You might want to set your default values to "" instead of none.  When
you create an instance of Contact, you should pass the first name,
last name, and email address.
> --
> https://mail.python.org/mailman/listinfo/python-list



-- 
Joel Goldstick
http://joelgoldstick.com



More information about the Python-list mailing list