Re: [Tutor] eval func with floating...

2011-08-23 Thread Chanakya Mitra
c=set(a).intersection(set(check)) shouldn’t this be: c=set(a).issubset(set(check)) ? set(a).intersection(set(check)) will be true as long as only one element appears in both. ie. 15/a8 kill the process and spit out an error instead of asking "error! please use -defined operators-!

[Tutor] Review my code

2011-09-26 Thread Chanakya Mitra
I wrote a short script that tries to check if an email address exists or not. It takes the domain of the inputted email and looks up the registered mail exchange. It then connects via smtp and attempts the "RCPT TO:" command and based on the response decides if the email exists or not.

Re: [Tutor] Review my code

2011-09-26 Thread Chanakya Mitra
6:42 To: Tutor@python.org Subject: Re: [Tutor] Review my code Chanakya Mitra wrote: > > > I wrote a short script that tries to check if an email address exists or > not. > def mailxch(hname): > mxhosts = DNS.mxlookup(hname) > return mxhosts That can be re-written as: