[issue16243] Regression in inspect module

2012-10-15 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

My bad, but I think documentation can be improved by adding an example.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
type: behavior -> enhancement
versions:  -Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16243] Regression in inspect module

2012-10-15 Thread STINNER Victor

STINNER Victor added the comment:

It looks like a typo in your code. You should use instead:
formatargspec(*getargspec(f))

Or better:
formatargspec(*getfullargspec(f))

Try with:
def f(a: int, b: float): pass

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16243] Regression in inspect module

2012-10-15 Thread Alexander Belopolsky

New submission from Alexander Belopolsky:

In Python 3.3.0 and 3.2.3:

>>> from inspect import *
>>> def f(a,b):pass
...
>>> formatargspec(getargspec(f))
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/inspect.py", 
line 905, in formatargspec
spec = formatargandannotation(arg)
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/inspect.py", 
line 898, in formatargandannotation
if arg in annotations:
TypeError: unhashable type: 'list'

No such error in 2.7.1:

>>> formatargspec(getargspec(f))
'((a, b), None, None, None)'

--
components: Library (Lib)
messages: 173003
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Regression in inspect module
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com