<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Objects/complexobject.c, branch 2.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/complexobject.c?h=2.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/complexobject.c?h=2.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2002-10-05T20:43:43Z</updated>
<entry>
<title>Backport 2.63 and 2.60:</title>
<updated>2002-10-05T20:43:43Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2002-10-05T20:43:43Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c52a36f657cea7ed38986d1fccd8199f84adf2d4'/>
<id>urn:sha1:c52a36f657cea7ed38986d1fccd8199f84adf2d4</id>
<content type='text'>
Call me anal, but there was a particular phrase that was speading to
comments everywhere that bugged me: /* Foo is inlined */ instead of
/* Inline Foo */.  Somehow the "is inlined" phrase always confused me
for half a second (thinking, "No it isn't" until I added the missing
"here").  The new phrase is hopefully unambiguous.

Close SF bug 563740. complex() now finds __complex__() in new style classes.
Made conversion failure error messages consistent between types.
Added related unittests.
</content>
</entry>
<entry>
<title>backport gvanrossum's patch:</title>
<updated>2002-04-18T05:39:54Z</updated>
<author>
<name>Anthony Baxter</name>
<email>anthonybaxter@gmail.com</email>
</author>
<published>2002-04-18T05:39:54Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ea89d8f235bc12d7fcf393778633ecb80cb75a27'/>
<id>urn:sha1:ea89d8f235bc12d7fcf393778633ecb80cb75a27</id>
<content type='text'>
Deprecate % as well.  The message for deprecation of //, % and divmod
is the same in all three cases (mostly because // calls divmod :-).

Original patches were:
python/dist/src/Objects/complexobject.c:2.59
</content>
</entry>
<entry>
<title>backport gvanrossum's patch:</title>
<updated>2002-04-18T05:37:51Z</updated>
<author>
<name>Anthony Baxter</name>
<email>anthonybaxter@gmail.com</email>
</author>
<published>2002-04-18T05:37:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c82143eb5e5fb44e7b49e763fefe02f71be4f3b4'/>
<id>urn:sha1:c82143eb5e5fb44e7b49e763fefe02f71be4f3b4</id>
<content type='text'>
SF bug #543387.

Complex numbers implement divmod() and //, neither of which makes one
lick of sense.  Unfortunately this is documented, so I'm adding a
deprecation warning now, so we can delete this silliness, oh, around
2005 or so.

Bugfix candidate (At least for 2.2.2, I think.)

Original patches were:
python/dist/src/Objects/complexobject.c:2.58
</content>
</entry>
<entry>
<title>backport tim_one's patch:</title>
<updated>2002-04-18T02:19:46Z</updated>
<author>
<name>Anthony Baxter</name>
<email>anthonybaxter@gmail.com</email>
</author>
<published>2002-04-18T02:19:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a2e92fcbf2121849fa5dc2f2232a0fdcb895ccf1'/>
<id>urn:sha1:a2e92fcbf2121849fa5dc2f2232a0fdcb895ccf1</id>
<content type='text'>
SF bug 543840: complex(string) accepts strings with \0
complex_subtype_from_string():  this stopped parsing at the first 0
byte, as if that were the end of the input string.
</content>
</entry>
<entry>
<title>backport tim_one's checkin of</title>
<updated>2002-03-25T13:21:41Z</updated>
<author>
<name>Michael W. Hudson</name>
<email>mwh@python.net</email>
</author>
<published>2002-03-25T13:21:41Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e99c99389c582b08a648d7f17823b2cce74e8842'/>
<id>urn:sha1:e99c99389c582b08a648d7f17823b2cce74e8842</id>
<content type='text'>
    revision 2.55 of complexobject.c

SF bug 533198:  Complex power underflow raises exception.
Konrad was too kind.  Not only did it raise an exception, the specific
exception it raised made no sense.  These are old bugs in complex_pow()
and friends:

1. Raising 0 to a negative power isn't a range error, it's a domain
   error, so changed c_pow() to set errno to EDOM in that case instead
   of ERANGE.

2. Changed complex_pow() to:

A. Used the Py_ADJUST_ERANGE2 macro to try to clear errno of a spurious
   ERANGE error due to underflow in the libm pow() called by c_pow().

B. Produced different exceptions depending on the errno value:
   i) For errno==EDOM, raise ZeroDivisionError instead of ValueError.
      This is for consistency with the non-complex cases 0.0**-2 and
      0**-2 and 0L**-2.
   ii) For errno==ERANGE, raise OverflowError.

Bugfix candidate.
</content>
</entry>
<entry>
<title>backport gvanrossum's checkin of</title>
<updated>2002-02-22T13:23:33Z</updated>
<author>
<name>Michael W. Hudson</name>
<email>mwh@python.net</email>
</author>
<published>2002-02-22T13:23:33Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=03474c5c5da180a91391b2284f77089eb976f580'/>
<id>urn:sha1:03474c5c5da180a91391b2284f77089eb976f580</id>
<content type='text'>
    revision 2.54 of complexobject.c

Declare real and imag as read-only attributes.

This fixes SF bug #514858 (Gregory Smith): complex not entirely
immutable

2.2.1 Bugfix candidate!
</content>
</entry>
<entry>
<title>Ensure that complex() only accepts a string argument as the first arg,</title>
<updated>2001-12-13T19:52:22Z</updated>
<author>
<name>Fred Drake</name>
<email>fdrake@acm.org</email>
</author>
<published>2001-12-13T19:52:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=526c7a0101d826fdab8b1ef5a757e1eae351687c'/>
<id>urn:sha1:526c7a0101d826fdab8b1ef5a757e1eae351687c</id>
<content type='text'>
and only if there is no second arg.
This closes SF patch #479551.
</content>
</entry>
<entry>
<title>complex_to_buf(), complex_subtype_from_c_complex(): Conversion of</title>
<updated>2001-11-28T20:50:56Z</updated>
<author>
<name>Barry Warsaw</name>
<email>barry@python.org</email>
</author>
<published>2001-11-28T20:50:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=01d697a06711d9070c459bc9f1028dd0abc79fab'/>
<id>urn:sha1:01d697a06711d9070c459bc9f1028dd0abc79fab</id>
<content type='text'>
sprintf() to PyOS_snprintf() for buffer overrun avoidance.

complex_print(), complex_repr(), complex_str(): Call complex_to_buf()
passing in sizeof(buf).
</content>
</entry>
<entry>
<title>complex_subtype_from_string(): move the declaration of s_buffer[] out</title>
<updated>2001-10-25T18:07:22Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-25T18:07:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=70e368836421a2e8c08dbd043a1540ad56d7ae5c'/>
<id>urn:sha1:70e368836421a2e8c08dbd043a1540ad56d7ae5c</id>
<content type='text'>
of the if block where it was before.  The name is only used inside
that if block, but the storage is referenced outside it via the 's'
variable.

(This patch was part of SF patch #474590 -- RISC OS support.)
</content>
</entry>
<entry>
<title>Enable GC for new-style instances.  This touches lots of files, since</title>
<updated>2001-10-05T20:51:39Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-05T20:51:39Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=9475a2310d9cdec4b4c36dee8bf30c72605ae928'/>
<id>urn:sha1:9475a2310d9cdec4b4c36dee8bf30c72605ae928</id>
<content type='text'>
many types were subclassable but had a xxx_dealloc function that
called PyObject_DEL(self) directly instead of deferring to
self-&gt;ob_type-&gt;tp_free(self).  It is permissible to set tp_free in the
type object directly to _PyObject_Del, for non-GC types, or to
_PyObject_GC_Del, for GC types.  Still, PyObject_DEL was a tad faster,
so I'm fearing that our pystone rating is going down again.  I'm not
sure if doing something like

void xxx_dealloc(PyObject *self)
{
	if (PyXxxCheckExact(self))
		PyObject_DEL(self);
	else
		self-&gt;ob_type-&gt;tp_free(self);
}

is any faster than always calling the else branch, so I haven't
attempted that -- however those types whose own dealloc is fancier
(int, float, unicode) do use this pattern.
</content>
</entry>
</feed>
