Guido van Rossum
b7f1afe4a8
Change the default repr() and str() of class instance objects to look
...
like <modulename.classname instance at ...> (to match the repr() of
class objects.
1997-12-03 00:06:02 +00:00
Guido van Rossum
3931df9250
Undo another glitch of the automatic not-so-Grand Renaming; some local
...
variables called 'coerce' were accidentally renamed to
'PyNumber_Coerce'. Rename them back to coercefunc.
1997-11-18 19:23:07 +00:00
Guido van Rossum
4a2a621907
Write a str() function for class objects that returns
...
"modulename.classname" instead of returning the same as repr().
1997-10-20 23:26:11 +00:00
Guido van Rossum
04d73c495e
Check that all base classes are indeed class objects, rather than
...
expecting the caller to do so.
1997-10-07 14:54:11 +00:00
Guido van Rossum
7cc56eb524
When creating a class, set its __module__ attribute to the module
...
whose name is in the current globals' __name__ variable. If __name__
is not set, ignore this.
1997-09-12 20:04:46 +00:00
Guido van Rossum
b2173c3146
Allow assignments to instance.__dict__ and instance.__class__. The
...
former lets you give an instance a set of new instance vars. The
latter lets you give it a new class. Both are typechecked and
disallowed in restricted mode.
For classes, the check for read-only special attributes is tightened
so that only assignments to __dict__, __bases__, __name__,
__getattr__, __setattr__, and __delattr__ (these could be made to work
as well, but I don't know if that's useful -- let's see first whether
mucking with instances will help).
1997-08-25 21:23:56 +00:00
Guido van Rossum
a0d349f46a
Added separate free list for instance method objects, for a few
...
percent speed up. Also add PyMethod_Fini() to discard it.
1997-08-05 02:06:53 +00:00
Guido van Rossum
c8b6df9004
PyObject_Compare can raise an exception now.
1997-05-23 00:06:51 +00:00
Guido van Rossum
0add15f6a5
removed last #ifdef SUPPORT_OBSOLETE_ACCESS bits.
1997-05-09 01:07:15 +00:00
Guido van Rossum
c0b618a2cc
Quickly renamed the last directory.
1997-05-02 03:12:38 +00:00
Guido van Rossum
a412d24be0
Intern the various string objects created to speed up lookups.
1997-01-18 07:59:12 +00:00
Guido van Rossum
cbd1e4eb5f
Yet more elaborate message for exception in __del__.
...
Make gcc -Wall happy.
1996-12-05 21:52:32 +00:00
Guido van Rossum
d266eb460e
New permission notice, includes CNRI.
1996-10-25 14:44:06 +00:00
Guido van Rossum
8bcf369cf9
Support passing in an empty dictionary of keywords to newinstanceobject.
1996-10-21 15:12:32 +00:00
Guido van Rossum
22a85e5308
More detailed error message about exception in __del__
1996-09-11 22:51:57 +00:00
Guido van Rossum
e5920bc4c6
Use getstringsize where available instead of strlen.
1996-08-26 14:58:03 +00:00
Guido van Rossum
ad8997887b
Be a bit more careful with printing a warning for a failed __del__.
1996-08-22 23:15:42 +00:00
Guido van Rossum
019f424a0a
More efficient handling of "__doc__" lookup.
1996-08-21 14:54:28 +00:00
Guido van Rossum
89227eb0f5
Write warning about exception in __del__ to stderr, not stdout.
1996-08-20 19:54:29 +00:00
Guido van Rossum
0dfcf753ad
Disable support for access statement
1996-08-12 22:00:53 +00:00
Guido van Rossum
2878a69922
Optimizations by Sjoerd:
...
- define tp_getattro, tp_setattro
- use precreated string objects for most common exceptions and method names
1996-08-09 20:53:24 +00:00
Guido van Rossum
3cb486879a
Only __dict__ and __class__ are read-only instance attributes
1996-07-21 02:29:46 +00:00
Guido van Rossum
441e4ab802
new debugger symbol names
1996-05-23 22:46:51 +00:00
Guido van Rossum
6dabc98400
Added __name__ attribute to class instance method objects.
...
Removed im_doc attribute; __name__ and __doc__ are now handled by
special casing in instancemethodgetattr(). This saves a few bytes and
INCREF/DECREF calls per i.m. object allocation/deallocation.
1996-05-14 21:54:20 +00:00
Sjoerd Mullender
6f011d7ad5
Get ordering right for TRACE_REFS/COUNT_ALLOCS combination (otherwise
...
may get inc_count sanity check abort).
1995-09-18 10:49:04 +00:00