[Python-ideas] Keyword/Symbol literals
alexander.belopolsky at gmail.com
Wed Jan 21 20:38:42 CET 2015
On Wed, Jan 21, 2015 at 2:13 PM, Guido van Rossum <guido at python.org> wrote:
> Lack of a use case?
My use case comes from interoperability with other languages. I maintain a
package which provides an interface  between Python and the language 
called Q. Q has 3 scalar types to represent text data (char, byte and
symbol) and the corresponding vector types. When I pass Python strings to
Q, I convert them to symbols because that is what users expect most of the
time, but as a result, working with char vectors is unnatural. I currently
use bytes type for that, but it is really an abuse because bytes should map
to byte vectors.
I realize that mine is a niche application, but the same problem is likely
to arise with other data systems that have "symbol" or categorical type.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas