cpython/Objects
Guido van Rossum c35422109b Fix SF bug #442501: calculate __module__ properly.
- type_module(), type_name(): if tp_name contains one or more period,
  the part before the last period is __module__, the part after that
  is __name__.  Otherwise, for non-heap types, __module__ is
  "__builtin__".  For heap types, __module__ is looked up in
  tp_defined.

- type_new(): heap types have their __module__ set from
  globals().__name__; a pre-existing __module__ in their dict is not
  overridden.  This is not inherited.

- type_repr(): if __module__ exists and is not "__builtin__", it is
  included in the string representation (just as it already is for
  classes).  For example <type '__main__.C'>.
2001-08-16 09:18:56 +00:00
..
.cvsignore
abstract.c
bufferobject.c
cellobject.c
classobject.c
cobject.c
complexobject.c
descrobject.c
dictobject.c
fileobject.c
floatobject.c
frameobject.c
funcobject.c
intobject.c
iterobject.c
listobject.c Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
longobject.c
methodobject.c
moduleobject.c
object.c
obmalloc.c
rangeobject.c
sliceobject.c
stringobject.c
tupleobject.c
typeobject.c
unicodectype.c
unicodeobject.c
unicodetype_db.h
xxobject.c