New submission from Daniel Shahaf:

Currently inspect.stack() returns a list of 6-tuples.  I suggest to make it 
return a list of named tuples, so code that only needs one tuple element can 
get it by name.

Current behaviour:
% ./python -c 'import inspect; print(inspect.stack()[0])' 
(<frame object at 0x157fb38>, '<string>', 1, '<module>', None, None)

Suggested behaviour:
% ./python -c 'import inspect; print(inspect.stack()[0])'    
FrameInfo(frame=<frame object at 0xddab38>, filename='<string>', lineno=1, 
function='<module>', code_context=None, index=None)

----------
components: Library (Lib)
files: inspect-v1.diff
keywords: patch
messages: 178467
nosy: danielsh
priority: normal
severity: normal
status: open
title: inspect.stack() should return list of named tuples
versions: Python 3.4
Added file: http://bugs.python.org/file28475/inspect-v1.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16808>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to