[New-bugs-announce] [issue18796] Wrong documentation of show_code function from dis module

Vajrasky Kok report at bugs.python.org
Wed Aug 21 04:56:59 CEST 2013

New submission from Vajrasky Kok:

$ ./python
Python 3.4.0a1+ (default:afb1b4797419, Aug 21 2013, 09:54:46) 
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dis
>>> import sys
>>> def spam(x):
...   return x * 2
>>> dis.show_code(spam, file=sys.stderr)
Name:              spam
Filename:          <stdin>
Argument count:    1
Kw-only arguments: 0
Number of locals:  1
Stack size:        2
   0: None
   1: 2
Variable names:
   0: x
>>> output = open('/tmp/output.txt', 'w')
>>> dis.show_code(spam, file=output)
>>> output.close()
>>> dis.show_code.__doc__
'Print details of methods, functions, or code to stdout.'

Attached the patch to fix the documentation.

assignee: docs at python
components: Documentation
files: fix_doc_show_code.patch
keywords: patch
messages: 195742
nosy: docs at python, vajrasky
priority: normal
severity: normal
status: open
title: Wrong documentation of show_code function from dis module
versions: Python 3.4
Added file: http://bugs.python.org/file31392/fix_doc_show_code.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list