Re: What GVariant corresponds to a Python3 int?
- From: Robert Park <robru gottengeography ca>
- To: Sebastian Pölsterl <sebp k-d-w org>
- Cc: python-hackers-list gnome org
- Subject: Re: What GVariant corresponds to a Python3 int?
- Date: Fri, 13 Jul 2012 08:52:05 -0500
On Fri, Jul 13, 2012 at 2:32 AM, Sebastian Pölsterl <sebp k-d-w org> wrote:
> note that Python3's int is essentially Python2's int [1], i.e. Python3
> does not have separate types for int and long, both are int.
>
> This could still be a problem in pygobject as well, not sure, yet.
>
> [1]: http://docs.python.org/py3k/whatsnew/3.0.html#integers
This explains why Python3 int corresponds to a glong, where Python2
int didn't, however there doesn't seem to be a GVariant that
corresponds to a glong. I tried all the gint32 and gint64 types,
nothing would suppress this error message.
It seems to me that there are two possible solutions to this: Invent a
new GVariant type that corresponds to a glong, or modify PyGObject to
make Python3 int correspond to a gint64 instead of a glong. It's not
clear to me which of these solutions is more correct, as I'm not very
familiar with C types.
In the meantime, what should I do as a workaround? Use floats?
--
http://gottengeography.ca
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]