Open DamienCassou opened 5 years ago
Hello,
The ping_pong.py file from MDN's webextension examples repo uses "@I"
instead of "=I"
, which is where I got that from. I can't remember specifically why I chose to use "@I"
, but both seem to work the same.
Here's the edit on MDN where @
is changed to =
[...]Either works as long native int is 32-bits (which I think is everywhere Firefox runs), but using
@I
is misleading.
And the Google Chrome sample host just uses I
, no @
or =
, which is the same as @I
according to the Python docs.
So, I don't think it really matters unless there's a system that has a native size for ints that's different from the standard size.
Rayquaza01 notifications@github.com writes:
The ping_pong.py file from MDN's webextension examples repo uses
"@I"
instead of"=I"
, which is where I got that from. I can't remember specifically why I chose to use"@I"
, but both seem to work the same. […]
Thank you very much for your detailed answer.
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
Hi,
in the code of this project, one can read:
In the MDN's documentation, one can read:
Would you mind telling me why you chose to use
"@I"
for the format instead of"=I"
?The related Python documentation is at: https://docs.python.org/2/library/struct.html