472,353 Members | 1,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

deprecated python 2.5

DeprecationWarning: struct integer overflow masking is deprecated
return struct.pack('>H', ~value)
i didn't understand if someone have some explanation
and what uses instead.
Sep 12 '06 #1
1 1473
bussiere maillist wrote:
DeprecationWarning: struct integer overflow masking is deprecated
return struct.pack('>H', ~value)
i didn't understand if someone have some explanation
and what uses instead.
Which 2.5 are you using? Mine (2.5c1, win32) gives me *TWO* messages,
the second of which hints at the obvious remedy:

| DOS prompt>\python25\python
| Python 2.5c1 (r25c1:51305, Aug 17 2006, 10:41:11) [MSC v.1310 32 bit
(Intel)] on
| win32
| Type "help", "copyright", "credits" or "license" for more
information.
| >>import struct
| >>struct.pack('>H', 1)
| '\x00\x01'
| >>struct.pack('>H', ~1)
| __main__:1: DeprecationWarning: struct integer overflow masking is
deprecated
| __main__:1: DeprecationWarning: 'H' format requires 0 <= number <=
65535
| '\xff\xfe'
| >>^Z
|
| DOS prompt>\python25\python
| Python 2.5c1 (r25c1:51305, Aug 17 2006, 10:41:11) [MSC v.1310 32 bit
(Intel)] on
| win32
| Type "help", "copyright", "credits" or "license" for more
information.
| >>import struct
| >>struct.pack('>H', (~1) & 0xffff)
| '\xff\xfe'
| >>>

HTH,
John

Sep 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Logan | last post by:
I read in PEP 279 the following comment by GvR: "filter and map should die and be subsumed into list comprehensions, not grow more variants." ...
2
by: Michele Simionato | last post by:
Some time ago I hacked a custom solution to run doctests on text files containing documentation. The solution involved this kind of game: ...
3
by: Rob McCrea | last post by:
Hi all, On windows98SE, running Python 2.3.4 (#53, May 25 2004, 21:17:02) on win32, the built-in help() function gives me a deprecation warning...
8
by: Uwe Mayer | last post by:
Hi, Why is the UserDict module is deprecated after Python 2.2. The application of it I have in mind is, i.e. multiple inheritance from "file" and...
3
by: Ben Rush | last post by:
When I compile my solution I get the following output - NET 2003\Vc7\atlmfc\include\atlwin.h(2027) : warning C4995: 'wsprintf': name was marked...
45
by: Gregory Petrosyan | last post by:
1) From 2.4.2 documentation: There are two new valid (semantic) forms for the raise statement: raise Class, instance raise instance 2) In...
2
bartonc
by: bartonc | last post by:
>>> import string >>> help(string) Help on module string: NAME string - A collection of string operations (most are no longer used). FILE...
1
by: Szabolcs Nagy | last post by:
I've just seen that gopherlib is deprecated in python 2.5 http://docs.python.org/lib/module-gopherlib.html we still use this protocol (though...
2
by: awalter1 | last post by:
Hello, (environment : python 2.4.2, pyGTK, GTK+ 2.6.9 under HPUX 11.11: unix) On the instruction self.window.destroy(), I get the following...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.