A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-October/029643.html below:

[Python-Dev] buffer('abc') == 'abc' is False ?!

[Python-Dev] buffer('abc') == 'abc' is False ?!Guido van Rossum guido@python.org
Wed, 16 Oct 2002 12:26:59 -0400
> >>Would be nice if there were a standard builtin, e.g. binary(),
> >>for this and maybe some support code to go with it in C (e.g.
> >>the type object would be nice to have at C level).
> > 
> > I disagree.  There are a thousand different applications, and yours
> > seems rather unusual to me.
> 
> It's not at all unusual if you interface to databases. These offer
> you three choices: character data, Unicode data and binary data
> and each of these is handled slightly differently.

I figure that most apps will be happy to return 8-bit strings for
binary data; that's what 8-bit strings were explicitly designed to
support.

> We currently don't have any notion of separating character data from
> binary except the difference between Unicode and strings. Using
> Unicode for character data only and reserving strings for
> binary data would be nice, except that practice shows that this
> doesn't always work because not all tools in the chain are
> ready for Unicode just yet (including Python's stdlib itself).

No, we'll eventually need a separate data type, but I doubt it needs
to be as compatible with the current 8-bit string type as your
requirements state.

> Nevermind, I'll roll my own,

You're welcome.

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4