mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
gvariant-text: fix bytestring example
ord('a') == 97 == 0x61 != 0x97. >>> GLib.Variant.parse(None, "[byte 0x97, 0x98, 0x99, 0]", None, None) GLib.Variant('ay', b'\227\230\231') >>> GLib.Variant.parse(None, "[byte 0x61, 0x62, 0x63, 0]", None, None) GLib.Variant('ay', b'abc')
This commit is contained in:
parent
04c8691208
commit
2e7d22a3bd
@ -579,7 +579,7 @@
|
|||||||
forms <literal>\0nnn</literal> and <literal>\xnn</literal>.
|
forms <literal>\0nnn</literal> and <literal>\xnn</literal>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
<literal>b'abc'</literal> is equivalent to <literal>[byte 0x97, 0x98, 0x99, 0]</literal>.
|
<literal>b'abc'</literal> is equivalent to <literal>[byte 0x61, 0x62, 0x63, 0]</literal>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
When formatting arrays of bytes, the printer will choose to display the array as a bytestring if it contains
|
When formatting arrays of bytes, the printer will choose to display the array as a bytestring if it contains
|
||||||
|
Loading…
Reference in New Issue
Block a user