Where/how to propose an addition to a standard module?

Aaron "Castironpi" Brady castironpi at gmail.com
Sat Oct 11 02:44:22 CEST 2008

On Oct 10, 2:10 pm, Joe Strout <j... at strout.net> wrote:
> I would like to propose a new method for the string.Template class.  
> What's the proper procedure for doing this?  I've joined the python-
> ideas list, but that seems to be only for proposed language changes,  
> and my idea doesn't require any change to the language at all.
>  From <http://www.python.org/dev/peps/pep-0001/>, it sounds like the  
> PEP process is appropriate here, though other PEPs (like <http://www.python.org/dev/peps/pep-3001/
>  > make it sound as though these are meant for proposals for "Python  
> 3000", which is not necessarily my intent.
> Here's a brief sketch of my proposal, in case it helps:
> Add a "match" function to string.Template, which takes a text string  
> as a parameter.  If this text string can be matched to the template,  
> by substituting some portion of the given string for each field of the  
> template, then .match returns a dictionary, where each key is a field  
> name and the value is the corresponding text from the input.  If the  
> text string cannot be matched to the template, then .match returns None.
> I understand that if I'm to write a PEP, I'll need to flesh this out  
> considerably as per PEP 0001.  But that document also suggests first  
> discussing it here.  I'm still a newbie (or actually, oldbie-turned-
> nonbie-turned-newbie-again), so I could use some advice.  What's the  
> next step in advocating for this idea?
> Thanks,
> - Joe

I think it's something the 're' module already does.  Correct me if
I'm wrong.

More information about the Python-list mailing list