Terry J. Reedy added the comment:

I changed the title because I believe a) the Python-level tuple of ints should 
be created on demand (I am not sure what the patch does); and b) the exposure 
should be done by an overt function rather than be an  'attribute', even if 
that is a front for a property getter.  The former would have to come with re.  
A function does not need to be a method, and can therefore be provided in a 3rd 
party module that accesses the C attribute via ctypes.  Such a function could 
be used with past versions of CPython.

Jelle, I suggest that you augment regdis with such function, so it does not 
depend on this issue.


I am closing this for reasons stated and the following.

I reread the thread.  Only one person with commit privileges participated.  The 
proposal got only tepid support for stdlib inclusion and at least as much or 
more support for 3rd party activity.  The thread ended with Jonathan saying 
"I've decided to shelve this idea for the time being".  Given the opposition of 
the current re maintainer, this proposal lacks sufficient support.

Modules as a whole can be OS specific (several examples) or CPython-specific 
(dis).  We generally avoid adding features within modules whose existence is 
implementation-specific.  "This attribute [a tuple of ints] is not guaranteed 
to exist in all implementations of Python." is almost enough to kill the 
proposal.

----------
resolution:  -> rejected
stage:  -> resolved
status: open -> closed
title: Expose regex bytecode as attribute of compiled pattern object -> Expose 
regex bytecode of compiled pattern object
versions: +Python 3.7 -Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26336>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to