write a regex matches 800-555-1212, 555-1212, and also (800) 555-1212.

Tim Delaney timothy.c.delaney at gmail.com
Sat Sep 29 20:10:22 EDT 2012


On 30 September 2012 09:26, Chris Angelico <rosuav at gmail.com> wrote:

> On Sun, Sep 30, 2012 at 6:51 AM, Tim Delaney
> <timothy.c.delaney at gmail.com> wrote:
> > Personally I voted for the Fierce Snake[1][2] as the delimiter, but it
> was
> > voted down as "not Pythonic" enough.
> > I'm sure they were using that as a euphamism for "Python*ish*" though.
> >
> > [1] https://en.wikipedia.org/wiki/Inland_Taipan
> > [2] It's is so pretty:
> >
> https://upload.wikimedia.org/wikipedia/commons/f/fe/Fierce_Snake-Oxyuranus_microlepidotus.jpg
>
> A tempting idea, but it's rather a large delimiter. We should reserve
> that for multi-line strings, I think. Although you may have a problem
> with i18n; when you take your code to the southern hemisphere, the
> snake will be facing the other way, so what you thought was an
> open-quote marker is now a close-quote marker instead. Could get
> awkward for naive coders
>

You seem to have that backwards. With the Oz-centric focus, it's taking
code to the northern hemisphere that's the problem.

Tim Delaney
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120930/e8e39fab/attachment.html>


More information about the Python-list mailing list