[issue24468] Expose compiler flag constants as code object attributes

2015-06-19 Thread Rose Ames

Changes by Rose Ames r...@happyspork.com:


--
nosy: +superluser

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24468
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24468] Expose compiler flag constants as code object attributes

2015-06-19 Thread Yury Selivanov

Yury Selivanov added the comment:

Nick, Larry, please take a look at the attached patch.

--
keywords: +patch
Added file: http://bugs.python.org/file39741/code.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24468
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24468] Expose compiler flag constants as code object attributes

2015-06-18 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
dependencies: +Awaitable ABC incompatible with functools.singledispatch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24468
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24468] Expose compiler flag constants as code object attributes

2015-06-18 Thread Nick Coghlan

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 rep...@bugs.python.org
http://bugs.python.org/issue24468
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24468] Expose compiler flag constants as code object attributes

2015-06-18 Thread Nick Coghlan

Nick Coghlan added the comment:

In my last set of review comments on issue 24400 I suggested changing the 
Python level attributes for coroutine objects to cr_frame, cr_code, and 
cr_running.

It's possible that may provide a different way to eliminate some of the current 
compiler flag checks.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24468
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24468] Expose compiler flag constants as code object attributes

2015-06-18 Thread Larry Hastings

Larry Hastings added the comment:

Probably, though I want to see a sample implementation before I agree to 
anything.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24468
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com