[Python-3000] Keep new.instance?

Collin Winter collinw at gmail.com
Fri May 26 18:51:57 CEST 2006


Going through and cleaning up failing tests in the p3yk branch...

Is there any interest in keeping new.instance()? It's defined as
equivalent to types.InstanceType, which is in turn defined as
(effectively)...

"""
class _C:
    pass

InstanceType = type(_C())
"""

Since _C under Python 3 will be new-style, type(_C()) is _C, not <type
'instance'> (as in 2.x).

Is there interest in keeping new.instance()'s functionality (that is,
in allowing users to create instances of a type, bypassing __init__ in
the process)?

Collin Winter


More information about the Python-3000 mailing list