[New-bugs-announce] [issue18830] Remove duplicates from a result of getclasstree()

Serhiy Storchaka report at bugs.python.org
Sun Aug 25 16:50:13 CEST 2013


New submission from Serhiy Storchaka:

inspect.getclasstree() produces duplicated entities when it's argument contains duplicated classes. This happened when a module contains class aliases. For example `pydoc zipfile` outputs three entities for BadZipFile (BadZipfile and error are aliases of BadZipFile):

CLASSES
    builtins.Exception(builtins.BaseException)
        BadZipFile
        BadZipFile
        BadZipFile
        LargeZipFile
    builtins.object
        ZipFile
            PyZipFile
        ZipInfo
    
The proposed patch removes duplicates from a result of getclasstree().

----------
components: Library (Lib)
files: getclasstree_no_dups.patch
keywords: patch
messages: 196138
nosy: eric.araujo, ezio.melotti, georg.brandl, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Remove duplicates from a result of getclasstree()
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file31461/getclasstree_no_dups.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18830>
_______________________________________


More information about the New-bugs-announce mailing list