On 20 April 2010 03:25, Tino Dai <obe...@gmail.com> wrote: > If I have: > > import re > a=re.compile('foo') > > is there a way to get the original pattern of foo from the object a? > > Thanks, > Tino > > > _______________________________________________ > Tutor maillist - tu...@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > >
a.pattern: >>> import re >>> a = re.compile("foo") >>> a.pattern 'foo' -- Rich "Roadie Rich" Lovely Just because you CAN do something, doesn't necessarily mean you SHOULD. In fact, more often than not, you probably SHOULDN'T. Especially if I suggested it. 10 re-discover BASIC 20 ??? 30 PRINT "Profit" 40 GOTO 10 _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor