[IronPython] Portable use of pickle.dumps()

Michael Foord fuzzyman at voidspace.org.uk
Fri May 29 17:13:14 CEST 2009


Robert Smallshire wrote:
> [snip...]
>
>> Is this a theoretical problem at this stage or an actual problem?
>>     
>
> Its an actual problem with SQLiteParameter.Value from the SQLite ADO.NET
> provider.  I think our original CPython code is a bit sloppy with respect to
> the distinction between text strings and byte arrays, so I'll probably need
> to tighten things up on both sides.
>
> Would you agree tha using unicode() and bytes() everywhere and avoiding
> str() gives code that has the same meaning in Python 2.6, IronPython 2.6 and
> Python 3.0?  Do you think this would be a good guideline to follow until we
> can leave Python 2.x behind?
>
>   

In Python 2.6 isn't bytes just an alias for str?

IronPython 2.6 may treat it slightly differently however...

On the CPython side I would definitely store text as Unicode as any 
problems you have treating strings as binary data (or vice versa) should 
become obvious a lot sooner.

All the best,

Michael

> Many thanks,
>
> Rob
>
>
>
>   


-- 
http://www.ironpythoninaction.com/




More information about the Ironpython-users mailing list