Donovan Baarda wrote:
Seriously, on the Python lists there has been a discussion rejecting an
md5sum implementation because the author donated it to the public domain.
Apparently lawyers have decided that you can't give code away. Intellectual
charity is illegal :-)
Despite the smiley: It is not
From: Armin Rigo [EMAIL PROTECTED]
Hi Tim,
On Thu, Feb 17, 2005 at 01:44:11PM -0500, Tim Peters wrote:
256 ** struct.calcsize('P')
Now if you'll just sign and fax a Zope contributor agreement, I'll
upgrade ZODB to use this slick trick wink.
I hereby donate this line of code to
Hi Tim,
On Mon, Feb 14, 2005 at 10:41:35AM -0500, Tim Peters wrote:
# This is a puzzle: there's no way to know the natural width of
# addresses on this box (in particular, there's no necessary
# relation to sys.maxint).
Isn't this natural width nowadays available as:
Maybe it's just a wart we have to live with now; OTOH,
the docs explicitly warn that id() may return a long, so any code
relying on short int-ness has always been relying on an
implementation quirk.
Well, the docs say that %x does unsigned conversion, so they've
been relying on an
Richard Brodie wrote:
Otherwise, unless I misunderstand integer unification, one would
just have to strike the distinction between, say, %d and %u.
Couldn't that be done anyway? The distinction really only
makes sense in C, where there's no way of knowing whether
the value is signed or unsigned
Hi all,
The Python binding in libxml2 uses the following code for __repr__():
class xmlNode(xmlCore):
def __init__(self, _obj=None):
self._o = None
xmlCore.__init__(self, _obj=_obj)
def __repr__(self):
return xmlNode (%s) object at 0x%x % (self.name, id (self))
With
[Troels Walsted Hansen]
The Python binding in libxml2 uses the following code for __repr__():
class xmlNode(xmlCore):
def __init__(self, _obj=None):
self._o = None
xmlCore.__init__(self, _obj=_obj)
def __repr__(self):
return xmlNode (%s) object at 0x%x %
On Feb 14, 2005, at 10:41 AM, Tim Peters wrote:
Wouldn't it be more elegant to make builtin_id() return an unsigned
long integer?
I think so. This is the function ZODB 3.3 uses, BTW:
def positive_id(obj):
Return id(obj) as a non-negative integer.
[...]
I think it'd be nice to change it, too.