[New-bugs-announce] [issue20349] Argument Clinic: error on __new__ or __init__ with no arguments

Tal Einat report at bugs.python.org
Wed Jan 22 17:42:02 CET 2014


New submission from Tal Einat:

This is caused by the code "fields = list(parser_body_fields)" under
"if new_or_init:" in CLanguage.output_templates().

'parser_body_fields' is initialized to None and may not be set before the
above mentioned code.

Attached is a patch which replaces the line with:

fields = list(parser_body_fields) if parser_body_fields is not None else []

----------
components: Build, Demos and Tools
files: fix_new_or_init_without_arguments.clinic.py.patch
keywords: patch
messages: 208826
nosy: larry, taleinat
priority: normal
severity: normal
status: open
title: Argument Clinic: error on __new__ or __init__ with no arguments
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33626/fix_new_or_init_without_arguments.clinic.py.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20349>
_______________________________________


More information about the New-bugs-announce mailing list