FAQ
I'm planning to build an external lib. This lib will exchange
a lot of strings between the lib and the "core Python code"
of applications.

I wish this lib to be modern, 100% unicode compliant. It will
be developped for Python 2.7 and for Python 3. In an early
phase, technically, it will be developed on Python 2.7 before
Python 3, probably 3.2.

Two options for the strings interface.

a) Pure unicode, that means only type 'unicode' in Python 2.7
and only type 'str' in Python 3.

Similar to the Python io module.

b) Like a) plus ascii and utf-8 encoded type 'str' to keep
some kind of retro compatibility. This lib will anyway
work in a "unicode mode", so the ascii and the encoded
utf-8 str's have to be converted into "unicode".

I'm very comfortable with all this coding stuff
and aware of the pros and cons of each solutions.

My favourite solution is clearly on the a) side.

Advices and comments are welcome. Thanks in advance.

Search Discussions

  • Terry Reedy at Nov 23, 2010 at 12:11 am

    On 11/22/2010 3:25 PM, jmfauth wrote:
    I'm planning to build an external lib. This lib will exchange
    a lot of strings between the lib and the "core Python code"
    of applications.
    Are you planning to exchange indirectly via disk files or directly via
    memory buffers?

    This pretty much amounts to whether the library will interface with
    Python-only or with anything.

    Also, what OSes? If 'all', you need to be able to work with both 2 and 4
    byte unicodes.

    --
    Terry Jan Reedy
  • Jmfauth at Nov 23, 2010 at 2:02 pm
    Thanks for the reply. Subject closed.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedNov 22, '10 at 8:25p
activeNov 23, '10 at 2:02p
posts3
users2
websitepython.org

2 users in discussion

Jmfauth: 2 posts Terry Reedy: 1 post

People

Translate

site design / logo © 2022 Grokbase