New submission from Nick Coghlan:

As part of the PEP 492 implementation, Yury has needed to hardcode compile flag 
contants in various places, with adjacent comments explaining what the magic 
numbers mean.

It occurred to me that there's a way we could make those constants readily 
available to any code manipulating code objects: expose them as read-only 
attributes via the code object type.

Does this seem like a reasonable idea?

If yes, would it be reasonable to classify it as part of the PEP 492 
implementation process and include it during the 3.5 beta cycle?

messages: 245487
nosy: gvanrossum, larry, ncoghlan, yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: Expose compiler flag constants as code object attributes
type: enhancement
versions: Python 3.5, Python 3.6

Python tracker <>
Python-bugs-list mailing list

Reply via email to