mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
In Python2 PyBytes is the same as PyString, but in Python3 PyString is gone and 'str' is really PyUnicode in C-API. When handling arbitrary data, use PyBytes - which is the right thing to do in Python3, and pose no API change in Python2. When handling xenstore paths and transaction ids, which have well defined format, use PyUnicode - to ease API usage - no need to prefix all xenstore paths with 'b' when migrating scripts to Python3. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
The file test.py here is from the Zope project, and is Copyright (c) 2001, 2002 Zope Corporation and Contributors. This file is released under the Zope Public License, version 2.0, a copy of which is in the file ZPL-2.0.