builtin regular expressions?

Antoine De Groote antoine at vo.lu
Sat Sep 30 05:24:56 EDT 2006


Hello,

Can anybody tell me the reason(s) why regular expressions are not built 
into Python like it is the case with Ruby and I believe Perl? Like for 
example in the following Ruby code

line = 'some string'

case line
   when /title=(.*)/
     puts "Title is #$1"
   when /track=(.*)/
     puts "Track is #$1"
   when /artist=(.*)/
     puts "Artist is #$1"
end

I'm sure there are good reasons, but I just don't see them.

Python Culture says: 'Explicit is better than implicit'. May it be 
related to this?

Regards,
antoine



More information about the Python-list mailing list