<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Objects/classobject.c, branch v2.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/classobject.c?h=v2.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/classobject.c?h=v2.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-10-26T17:56:51Z</updated>
<entry>
<title>Be smarter about clearing the weakref lists for instances, instance methods,</title>
<updated>2001-10-26T17:56:51Z</updated>
<author>
<name>Fred Drake</name>
<email>fdrake@acm.org</email>
</author>
<published>2001-10-26T17:56:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c916f5a390b0ca559de54a15d4014e18792674ea'/>
<id>urn:sha1:c916f5a390b0ca559de54a15d4014e18792674ea</id>
<content type='text'>
and functions: we only need to call PyObject_ClearWeakRefs() if the weakref
list is non-NULL.  Since these objects are common but weakrefs are still
unusual, saving the call at deallocation time makes a lot of sense.
</content>
</entry>
<entry>
<title>Fix for SF bug #472940: can't getattr() attribute shown by dir()</title>
<updated>2001-10-22T02:00:09Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-22T02:00:09Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=56ff387a7e625a692851e2e5ffdea096b72831f7'/>
<id>urn:sha1:56ff387a7e625a692851e2e5ffdea096b72831f7</id>
<content type='text'>
There really isn't a good reason for instance method objects to have
their own __dict__, __doc__ and __name__ properties that just delegate
the request to the function (callable); the default attribute behavior
already does this.

The test suite had to be fixed because the error changes from
TypeError to AttributeError.
</content>
</entry>
<entry>
<title>Protect references to tp_descr_get and tp_dict with the appropriate test:</title>
<updated>2001-10-17T20:26:38Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-17T20:26:38Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=915f0eb212f62f10611180ed2d7874dae5bc66e3'/>
<id>urn:sha1:915f0eb212f62f10611180ed2d7874dae5bc66e3</id>
<content type='text'>
PyType_HasFeature(t, Py_TPFLAGS_HAVE_CLASS).
</content>
</entry>
<entry>
<title>SF bug [#466173] unpack TypeError unclear</title>
<updated>2001-09-30T05:58:42Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-30T05:58:42Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8b13b3ede270bf6f7bf3427675e335ab0bd0f75b'/>
<id>urn:sha1:8b13b3ede270bf6f7bf3427675e335ab0bd0f75b</id>
<content type='text'>
Replaced 3 instances of "iter() of non-sequence" with
"iteration over non-sequence".
Restored "unpack non-sequence" for stuff like "a, b = 1".
</content>
</entry>
<entry>
<title>Add optional docstrings to getset descriptors.  Fortunately, there's</title>
<updated>2001-09-20T21:45:26Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-09-20T21:45:26Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=32d34c809f5971f79462dcb7d0f536d46e624acc'/>
<id>urn:sha1:32d34c809f5971f79462dcb7d0f536d46e624acc</id>
<content type='text'>
no backwards compatibility to worry about, so I just pushed the
'closure' struct member to the back -- it's never used in the current
code base (I may eliminate it, but that's more work because the getter
and setter signatures would have to change.)

As examples, I added actual docstrings to the getset attributes of a
few types: file.closed, xxsubtype.spamdict.state.
</content>
</entry>
<entry>
<title>Add optional docstrings to member descriptors.  For backwards</title>
<updated>2001-09-20T20:46:19Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-09-20T20:46:19Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6f7993765ac0989b5d13084240797913627a31d8'/>
<id>urn:sha1:6f7993765ac0989b5d13084240797913627a31d8</id>
<content type='text'>
compatibility, this required all places where an array of "struct
memberlist" structures was declared that is referenced from a type's
tp_members slot to change the type of the structure to PyMemberDef;
"struct memberlist" is now only used by old code that still calls
PyMember_Get/Set.  The code in PyObject_GenericGetAttr/SetAttr now
calls the new APIs PyMember_GetOne/SetOne, which take a PyMemberDef
argument.

As examples, I added actual docstrings to the attributes of a few
types: file, complex, instance method, super, and xxsubtype.spamlist.

Also converted the symtable to new style getattr.
</content>
</entry>
<entry>
<title>Properly repr classes without module names.</title>
<updated>2001-09-18T20:23:28Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2001-09-18T20:23:28Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=cf95f9cacbbd8706537e75613690bb6d5997eef3'/>
<id>urn:sha1:cf95f9cacbbd8706537e75613690bb6d5997eef3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Redo the PyMethod attributes using a dir()-friendly approach, creating</title>
<updated>2001-09-18T03:53:24Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-09-18T03:53:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f0b35e1501f279aba1b97df068c6bc7384e2ab1a'/>
<id>urn:sha1:f0b35e1501f279aba1b97df068c6bc7384e2ab1a</id>
<content type='text'>
descriptors for each attribute.  The getattr() implementation is
similar to PyObject_GenericGetAttr(), but delegates to im_self instead
of looking in __dict__; I couldn't do this as a wrapper around
PyObject_GenericGetAttr().

XXX A problem here is that this is a case of *delegation*.  dir()
doesn't see exactly the same attributes that are actually defined;
e.g. if the delegate is a Python function object, it supports
attributes like func_code etc., but these are not visible to dir(); on
the other hand, dynamic function attributes (stored in the function's
__dict__) *are* visible to dir().  Maybe we need a mechanism to tell
dir() about the delegation mechanism?  I vaguely recall seeing a
request in the newsgroup for a more formal definition of attribute
delegation too.  Sigh, time for a new PEP.
</content>
</entry>
<entry>
<title>Generalize operator.indexOf (PySequence_Index) to work with any</title>
<updated>2001-09-08T04:00:12Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-08T04:00:12Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=16a77adfbd745c202878fabb0b921514fec7ca16'/>
<id>urn:sha1:16a77adfbd745c202878fabb0b921514fec7ca16</id>
<content type='text'>
iterable object.  I'm not sure how that got overlooked before!

Got rid of the internal _PySequence_IterContains, introduced a new
internal _PySequence_IterSearch, and rewrote all the iteration-based
"count of", "index of", and "is the object in it or not?" routines to
just call the new function.  I suppose it's slower this way, but the
code duplication was getting depressing.
</content>
</entry>
<entry>
<title>PyClass_New(): put the extended Don Beaudry hook back in.  When one of</title>
<updated>2001-09-07T21:08:32Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-09-07T21:08:32Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=28d80b1058c73b296f41861ac9f39534c7a3ee4b'/>
<id>urn:sha1:28d80b1058c73b296f41861ac9f39534c7a3ee4b</id>
<content type='text'>
the base classes is not a classic class, and its class (the metaclass)
is callable, call the metaclass to do the deed.

One effect of this is that, when mixing classic and new-style classes
amongst the bases of a class, it doesn't matter whether the first base
class is a classic class or not: you will always get the error
"TypeError: metatype conflict among bases".  (Formerly, with a classic
class first, you'd get "TypeError: PyClass_New: base must be a class".)

Another effect is that multiple inheritance from ExtensionClass.Base,
with a classic class as the first class, transfers control to the
ExtensionClass.Base class.  This is what we need for SF #443239 (and
also for running Zope under 2.2a4, before ExtensionClass is replaced).
</content>
</entry>
</feed>
