classification
Title: help(pickle) fails: unorderable types: type() < type()
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.0, Python 2.6, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: Qrczak, georg.brandl
Priority: normal Keywords:

Created on 2007-09-12 10:46 by Qrczak, last changed 2007-09-12 19:01 by georg.brandl. This issue is now closed.

Messages (2)
msg55839 - (view) Author: Marcin 'Qrczak' Kowalczyk (Qrczak) Date: 2007-09-12 10:46
Python 3.0a1 (py3k, Sep  8 2007, 15:57:56) 
[GCC 4.2.1 20070719 (release) (PLD-Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle
>>> help(pickle)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.0/site.py", line 350, in __call__
    return pydoc.help(*args, **kwds)
  File "/usr/local/lib/python3.0/pydoc.py", line 1685, in __call__
    self.help(request)
  File "/usr/local/lib/python3.0/pydoc.py", line 1729, in help
    else: doc(request, 'Help on %s:')
  File "/usr/local/lib/python3.0/pydoc.py", line 1512, in doc
    pager(render_doc(thing, title, forceload))
  File "/usr/local/lib/python3.0/pydoc.py", line 1490, in render_doc
    return title % desc + '\n\n' + text.document(object, name)
  File "/usr/local/lib/python3.0/pydoc.py", line 319, in document
    if inspect.ismodule(object): return self.docmodule(*args)
  File "/usr/local/lib/python3.0/pydoc.py", line 1076, in docmodule
    contents.append(self.document(value, key, name))
  File "/usr/local/lib/python3.0/pydoc.py", line 320, in document
    if inspect.isclass(object): return self.docclass(*args)
  File "/usr/local/lib/python3.0/pydoc.py", line 1210, in docclass
    lambda t: t[1] == 'data')
  File "/usr/local/lib/python3.0/pydoc.py", line 1173, in spilldata
    name, mod, maxlen=70, doc=doc) + '\n')
  File "/usr/local/lib/python3.0/pydoc.py", line 1295, in docother
    repr = self.repr(object)
  File "/usr/local/lib/python3.0/repr.py", line 24, in repr
    return self.repr1(x, self.maxlevel)
  File "/usr/local/lib/python3.0/pydoc.py", line 954, in repr1
    return getattr(self, methodname)(x, level)
  File "/usr/local/lib/python3.0/repr.py", line 78, in repr_dict
    for key in islice(sorted(x), self.maxdict):
TypeError: unorderable types: type() < type()
>>>
msg55857 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-09-12 19:01
Fixed in the repr module (it was calling sorted() on sets and dicts,
which is wrong without fallback) in rev. 58122 (trunk), 58123 (2.5) --
will be merged to 3.0 shortly.
History
Date User Action Args
2007-09-12 19:01:35georg.brandlsetstatus: open -> closed
versions: + Python 2.6, Python 2.5
nosy: + georg.brandl
messages: + msg55857
assignee: georg.brandl
resolution: fixed
2007-09-12 10:46:54Qrczakcreate