[New-bugs-announce] [issue31230] Add __code__ attributes to generator and coroutine objects
Nick Coghlan
report at bugs.python.org
Thu Aug 17 22:25:30 EDT 2017
New submission from Nick Coghlan:
As covered in issue 31183, correctly disassembling functions, generator-iterators, coroutines, and async generator-iterators currently requires checking for 4 different attributes:
* __code__ (functions)
* gi_code (generator iterators)
* cr_code (coroutines)
* ag_code (async generator iterators)
This could be simplified if the latter three all *also* exposed their code attributes as `__code__`.
----------
messages: 300468
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Add __code__ attributes to generator and coroutine objects
type: enhancement
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31230>
_______________________________________
More information about the New-bugs-announce
mailing list