Converting DD MM YYYY into YYYY-MM-DD?

Ben Finney ben+python at benfinney.id.au
Tue Aug 18 06:37:47 EDT 2009


Gilles Ganault <nospam at nospam.com> writes:

> On Tue, 18 Aug 2009 20:03:47 +1000, Ben Finney
> <ben+python at benfinney.id.au> wrote:
> >The principles of handling text in Python: Get it to internal Unicode
> >objects as soon as possible, handle it as Unicode for as long as
> >possible, and only encode it to some byte stream for output as late as
> >possible.
>
> Thanks much for the tip. I'll keep that in mind when I have strings
> with accents.

Again, note that these recommendations hold for *any* text in Python,
with or without accents; once you accept that text is best handled in
Unicode, there's little sense in making an exception for the limited
subset that happens to be representable in ASCII.

-- 
 \        “The Bermuda Triangle got tired of warm weather. It moved to |
  `\               Alaska. Now Santa Claus is missing.” —Steven Wright |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list