[storm] Should storm have separate String and Blob datatypes?

Gustavo Niemeyer gustavo at niemeyer.net
Wed Jul 1 15:44:10 BST 2009


> Actually, Python 2.6 doesn't have a separate bytes type.  It is just
> an alias for the existing byte string type:

Ouch.. from the discussions during development I understood that it'd
actually be the real bytes type.

> This is pretty close to Python 3 where stringobject.c was renamed
> bytesobject.c: they have never existed in parallel.  So I don't think
> we want separate Bytes() and RawStr().

It wasn't just renamed it's a very differently behaving type:

>>> bytes(b"foo")[0]
102

So I still think we should make Bytes support the real bytes type, and
keep RawStr on the old str.   This will likely yield startup
exceptions rather than late runtime ones, and will help people
upgrading it smoothly.

> For what it is worth, we seem to have another alias for RawStr().  In
> storm/properties.py we have:
>
>    # OBSOLETE RawStr was Chars in 0.9. This will die soon.
>    Chars = RawStr
>
> We can probably get rid of that one now.

+1!

-- 
Gustavo Niemeyer
http://niemeyer.net



More information about the storm mailing list