[Tutor] Decorator listing

Steven D'Aprano steve at pearwood.info
Wed Jul 28 00:21:38 CEST 2010

Hello Mary,

On Wed, 28 Jul 2010 06:11:18 am Mary Morris wrote:
> I'm writing a program with python that compiles a list of decorators
> from my company's source code.  I'm new to python and need help with
> the following: I'm trying to make the program find ".com" in any 
> lines and not include them in the list of decorators that gets
> returned.  

What's special about .com? What about email addresses that end 
in .org, .co.uk, .net. .gov.au, .cx, .info, .biz, or any one of a 
million million other email addresses?

> THis is because I had the program look for the @ symbol to 
> find the decorators and it returned email addresses in the list. 

With respect Mary, I replied to your last question about this on 
Saturday. Did you read that? Was it useful? Did you have questions? I 
think the approach you are taking is the wrong approach and is doomed 
to failure. I fear that you are taking a problem that can be solved 
very simply, and making it much, much, much more complicated than it 
needs to be.

Please read my email sent in response to your last question about this, 
and good luck!

Steven D'Aprano

More information about the Tutor mailing list