[New-bugs-announce] [issue36962] Cant sort ModuleInfo instances

Batuhan report at bugs.python.org
Sat May 18 23:18:37 EDT 2019


New submission from Batuhan <batuhanosmantaskaya at gmail.com>:

I can't sort the result of iter_modules;
>>> import random, pkgutil
>>> modules = list(pkgutil.iter_modules(None))
>>> random.shuffle(modules)
>>> sorted(modules)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: '<' not supported between instances of 'FileFinder' and 'FileFinder'

----------
components: Library (Lib)
messages: 342830
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Cant sort ModuleInfo instances
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36962>
_______________________________________


More information about the New-bugs-announce mailing list